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