aboutsummaryrefslogtreecommitdiff
path: root/src/net/ipv4.c
diff options
context:
space:
mode:
authorNikhil Chandru Rao <nikhilcrao@users.sourceforge.net>2006-08-08 22:26:35 +0000
committerNikhil Chandru Rao <nikhilcrao@users.sourceforge.net>2006-08-08 22:26:35 +0000
commit409f69a08a89ed3b604c59b8b96833f26fc8f2f0 (patch)
treeaf106d00cacb4dbdf8694f2a5d1f5aaac3ced5fa /src/net/ipv4.c
parent8bf38fb40093f142582f4e11a8af0d795c079559 (diff)
downloadipxe-409f69a08a89ed3b604c59b8b96833f26fc8f2f0.zip
ipxe-409f69a08a89ed3b604c59b8b96833f26fc8f2f0.tar.gz
ipxe-409f69a08a89ed3b604c59b8b96833f26fc8f2f0.tar.bz2
Changed ipv4_dump() to consume only one line.
Diffstat (limited to 'src/net/ipv4.c')
-rw-r--r--src/net/ipv4.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/net/ipv4.c b/src/net/ipv4.c
index 4c07c2c..59fa9f8 100644
--- a/src/net/ipv4.c
+++ b/src/net/ipv4.c
@@ -107,21 +107,6 @@ void del_ipv4_address ( struct net_device *netdev ) {
*/
static void ipv4_dump ( struct iphdr *iphdr __unused ) {
-/*
- DBG ( "IP4 header at %p+%#zx\n", iphdr, sizeof ( *iphdr ) );
- DBG ( "\tVersion = %d\n", ( iphdr->verhdrlen & IP_MASK_VER ) / 16 );
- DBG ( "\tHeader length = %d\n", iphdr->verhdrlen & IP_MASK_HLEN );
- DBG ( "\tService = %d\n", iphdr->service );
- DBG ( "\tTotal length = %d\n", ntohs ( iphdr->len ) );
- DBG ( "\tIdent = %d\n", ntohs ( iphdr->ident ) );
- DBG ( "\tFrags/Offset = %d\n", ntohs ( iphdr->frags ) );
- DBG ( "\tIP TTL = %d\n", iphdr->ttl );
- DBG ( "\tProtocol = %d\n", iphdr->protocol );
- DBG ( "\tHeader Checksum (at %p) = %x\n", &iphdr->chksum,
- ntohs ( iphdr->chksum ) );
- DBG ( "\tSource = %s\n", inet_ntoa ( iphdr->src ) );
- DBG ( "\tDestination = %s\n", inet_ntoa ( iphdr->dest ) );
-*/
DBG ( "IP4 %p transmitting %p+%d ident %d protocol %d header-csum %x\n",
&ipv4_protocol, iphdr, ntohs ( iphdr->len ), ntohs ( iphdr->ident ),
iphdr->protocol, ntohs ( iphdr->chksum ) );
@@ -458,6 +443,7 @@ static int ipv4_rx ( struct pk_buff *pkb, struct net_device *netdev __unused,
/* Strip header */
pkb_pull ( pkb, sizeof ( *iphdr ) );
+ pkb_unput ( pkb, pkb_len ( pkb ) - htons ( iphdr->len ) );
/* Send it to the transport layer */
return tcpip_rx ( pkb, iphdr->protocol, &src.st, &dest.st );