Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/inetsrv/icmpv6.c

    r1d94e21 r1d24ad3  
    4747#include "pdu.h"
    4848
     49static int ndp_received(inet_dgram_t *dgram)
     50{
     51        // FIXME TODO
     52        return ENOTSUP;
     53}
     54
    4955static int icmpv6_recv_echo_request(inet_dgram_t *dgram)
    5056{
     
    7884        inet_dgram_t rdgram;
    7985       
    80         inet_get_srcaddr(&dgram->src, 0, &rdgram.src);
     86        rdgram.src = dgram->dest;
    8187        rdgram.dest = dgram->src;
    8288        rdgram.tos = 0;
     
    8490        rdgram.size = size;
    8591       
    86         icmpv6_phdr_t phdr;
     92        icmpv6_pseudo_header phdr;
    8793       
    8894        host2addr128_t_be(dest_v6, phdr.src_addr);
     
    94100        uint16_t cs_phdr =
    95101            inet_checksum_calc(INET_CHECKSUM_INIT, &phdr,
    96             sizeof(icmpv6_phdr_t));
     102            sizeof(icmpv6_pseudo_header));
    97103       
    98104        uint16_t cs_all = inet_checksum_calc(cs_phdr, reply, size);
     
    150156        case ICMPV6_NEIGHBOUR_SOLICITATION:
    151157        case ICMPV6_NEIGHBOUR_ADVERTISEMENT:
     158#ifdef ACCEPT_RA
    152159        case ICMPV6_ROUTER_ADVERTISEMENT:
     160#endif
    153161                return ndp_received(dgram);
    154162        default:
     
    184192        dgram.size = rsize;
    185193       
    186         icmpv6_phdr_t phdr;
     194        icmpv6_pseudo_header phdr;
    187195       
    188196        host2addr128_t_be(sdu->src, phdr.src_addr);
     
    194202        uint16_t cs_phdr =
    195203            inet_checksum_calc(INET_CHECKSUM_INIT, &phdr,
    196             sizeof(icmpv6_phdr_t));
     204            sizeof(icmpv6_pseudo_header));
    197205       
    198206        uint16_t cs_all = inet_checksum_calc(cs_phdr, rdata, rsize);
Note: See TracChangeset for help on using the changeset viewer.