Changeset 47f5a77 in mainline for uspace/srv/net/inetsrv/icmpv6.c


Ignore:
Timestamp:
2013-07-17T08:46:06Z (11 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3a0a4d8
Parents:
cdc3afa (diff), 1d94e21 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge mainline changes

File:
1 edited

Legend:

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

    rcdc3afa r47f5a77  
    4747#include "pdu.h"
    4848
    49 static int ndp_received(inet_dgram_t *dgram)
    50 {
    51         // FIXME TODO
    52         return ENOTSUP;
    53 }
    54 
    5549static int icmpv6_recv_echo_request(inet_dgram_t *dgram)
    5650{
     
    8478        inet_dgram_t rdgram;
    8579       
    86         rdgram.src = dgram->dest;
     80        inet_get_srcaddr(&dgram->src, 0, &rdgram.src);
    8781        rdgram.dest = dgram->src;
    8882        rdgram.tos = 0;
     
    9084        rdgram.size = size;
    9185       
    92         icmpv6_pseudo_header phdr;
     86        icmpv6_phdr_t phdr;
    9387       
    9488        host2addr128_t_be(dest_v6, phdr.src_addr);
     
    10094        uint16_t cs_phdr =
    10195            inet_checksum_calc(INET_CHECKSUM_INIT, &phdr,
    102             sizeof(icmpv6_pseudo_header));
     96            sizeof(icmpv6_phdr_t));
    10397       
    10498        uint16_t cs_all = inet_checksum_calc(cs_phdr, reply, size);
     
    156150        case ICMPV6_NEIGHBOUR_SOLICITATION:
    157151        case ICMPV6_NEIGHBOUR_ADVERTISEMENT:
    158 #ifdef ACCEPT_RA
    159152        case ICMPV6_ROUTER_ADVERTISEMENT:
    160 #endif
    161153                return ndp_received(dgram);
    162154        default:
     
    192184        dgram.size = rsize;
    193185       
    194         icmpv6_pseudo_header phdr;
     186        icmpv6_phdr_t phdr;
    195187       
    196188        host2addr128_t_be(sdu->src, phdr.src_addr);
     
    202194        uint16_t cs_phdr =
    203195            inet_checksum_calc(INET_CHECKSUM_INIT, &phdr,
    204             sizeof(icmpv6_pseudo_header));
     196            sizeof(icmpv6_phdr_t));
    205197       
    206198        uint16_t cs_all = inet_checksum_calc(cs_phdr, rdata, rsize);
Note: See TracChangeset for help on using the changeset viewer.