Bladeren bron

Changed ipv4_dump() to consume only one line.

tags/v0.9.3
Nikhil Chandru Rao 18 jaren geleden
bovenliggende
commit
409f69a08a
1 gewijzigde bestanden met toevoegingen van 1 en 15 verwijderingen
  1. 1
    15
      src/net/ipv4.c

+ 1
- 15
src/net/ipv4.c Bestand weergeven

@@ -107,21 +107,6 @@ void del_ipv4_address ( struct net_device *netdev ) {
107 107
  */
108 108
 static void ipv4_dump ( struct iphdr *iphdr __unused ) {
109 109
 
110
-/*
111
-	DBG ( "IP4 header at %p+%#zx\n", iphdr, sizeof ( *iphdr ) );
112
-	DBG ( "\tVersion = %d\n", ( iphdr->verhdrlen & IP_MASK_VER ) / 16 );
113
-	DBG ( "\tHeader length = %d\n", iphdr->verhdrlen & IP_MASK_HLEN );
114
-	DBG ( "\tService = %d\n", iphdr->service );
115
-	DBG ( "\tTotal length = %d\n", ntohs ( iphdr->len ) );
116
-	DBG ( "\tIdent = %d\n", ntohs ( iphdr->ident ) );
117
-	DBG ( "\tFrags/Offset = %d\n", ntohs ( iphdr->frags ) );
118
-	DBG ( "\tIP TTL = %d\n", iphdr->ttl );
119
-	DBG ( "\tProtocol = %d\n", iphdr->protocol );
120
-	DBG ( "\tHeader Checksum (at %p) = %x\n", &iphdr->chksum, 
121
-				ntohs ( iphdr->chksum ) );
122
-	DBG ( "\tSource = %s\n", inet_ntoa ( iphdr->src ) );
123
-	DBG ( "\tDestination = %s\n", inet_ntoa ( iphdr->dest ) );
124
-*/
125 110
 	DBG ( "IP4 %p transmitting %p+%d ident %d protocol %d header-csum %x\n",
126 111
 		&ipv4_protocol, iphdr, ntohs ( iphdr->len ), ntohs ( iphdr->ident ),
127 112
 		iphdr->protocol, ntohs ( iphdr->chksum ) );
@@ -458,6 +443,7 @@ static int ipv4_rx ( struct pk_buff *pkb, struct net_device *netdev __unused,
458 443
 
459 444
 	/* Strip header */
460 445
 	pkb_pull ( pkb, sizeof ( *iphdr ) );
446
+	pkb_unput ( pkb, pkb_len ( pkb ) - htons ( iphdr->len ) );
461 447
 
462 448
 	/* Send it to the transport layer */
463 449
 	return tcpip_rx ( pkb, iphdr->protocol, &src.st, &dest.st );

Laden…
Annuleren
Opslaan