Some clarity
This commit is contained in:
@@ -20,10 +20,10 @@ int process_icmpv4_rloc_update( struct rlocs *reg, struct packet *packet )
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct rloc *s_rloc;
|
||||
struct rloc *d_rloc;
|
||||
struct rloc *s_rloc = NULL;
|
||||
struct rloc *d_rloc = NULL;
|
||||
|
||||
struct icmphdr *icmp = (struct icmphdr *) packet->payload + ( packet->hdr.ip.ihl * 4 );
|
||||
struct icmphdr *icmp = (struct icmphdr *) ( packet->payload + ( packet->hdr.ip.ihl * 4 ) );
|
||||
|
||||
if ( icmp->type != ICMP_DEST_UNREACH && icmp->code != ICMP_FRAG_NEEDED ) {
|
||||
return 0; // It may be going elsewhere
|
||||
|
@@ -260,7 +260,7 @@ int wrap_ipv4_packet_in_ipv4( struct peer_context *pctx, struct packet *pkt, str
|
||||
|
||||
// wrap_ipv4_packet only touches scratch upto IP_MAXPACKET. We allocate
|
||||
// double that.
|
||||
struct packet *pkt2 = (struct packet *) frag2->scratch + IP_MAXPACKET;
|
||||
struct packet *pkt2 = (struct packet *) ( frag2->scratch + IP_MAXPACKET );
|
||||
|
||||
pkt->hdr.ip.tot_len = htons( pkt_hdr_len + frag_off );
|
||||
pkt->hdr.ip.id = htons( frag_id );
|
||||
|
Reference in New Issue
Block a user