Changes in uspace/srv/net/inetsrv/icmpv6.c [1d94e21:1d24ad3] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/inetsrv/icmpv6.c
r1d94e21 r1d24ad3 47 47 #include "pdu.h" 48 48 49 static int ndp_received(inet_dgram_t *dgram) 50 { 51 // FIXME TODO 52 return ENOTSUP; 53 } 54 49 55 static int icmpv6_recv_echo_request(inet_dgram_t *dgram) 50 56 { … … 78 84 inet_dgram_t rdgram; 79 85 80 inet_get_srcaddr(&dgram->src, 0, &rdgram.src);86 rdgram.src = dgram->dest; 81 87 rdgram.dest = dgram->src; 82 88 rdgram.tos = 0; … … 84 90 rdgram.size = size; 85 91 86 icmpv6_p hdr_tphdr;92 icmpv6_pseudo_header phdr; 87 93 88 94 host2addr128_t_be(dest_v6, phdr.src_addr); … … 94 100 uint16_t cs_phdr = 95 101 inet_checksum_calc(INET_CHECKSUM_INIT, &phdr, 96 sizeof(icmpv6_p hdr_t));102 sizeof(icmpv6_pseudo_header)); 97 103 98 104 uint16_t cs_all = inet_checksum_calc(cs_phdr, reply, size); … … 150 156 case ICMPV6_NEIGHBOUR_SOLICITATION: 151 157 case ICMPV6_NEIGHBOUR_ADVERTISEMENT: 158 #ifdef ACCEPT_RA 152 159 case ICMPV6_ROUTER_ADVERTISEMENT: 160 #endif 153 161 return ndp_received(dgram); 154 162 default: … … 184 192 dgram.size = rsize; 185 193 186 icmpv6_p hdr_tphdr;194 icmpv6_pseudo_header phdr; 187 195 188 196 host2addr128_t_be(sdu->src, phdr.src_addr); … … 194 202 uint16_t cs_phdr = 195 203 inet_checksum_calc(INET_CHECKSUM_INIT, &phdr, 196 sizeof(icmpv6_p hdr_t));204 sizeof(icmpv6_pseudo_header)); 197 205 198 206 uint16_t cs_all = inet_checksum_calc(cs_phdr, rdata, rsize);
Note:
See TracChangeset
for help on using the changeset viewer.