aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-03 03:59:17 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-11-05 17:11:29 -0500
commitfebf0a431e42f5a1fdb2b763273700610552ddcc (patch)
treef855db5d5e01045eae4881d8c020ac8c524460c4
parentd1208b999dd367b72168cc3c7f8d8d2c95143c67 (diff)
[NETFILTER] bug: skb->protocol is already net-endian
htons() is not needed (and no, it's not misspelled ntohs() - userland expects net-endian here). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/netfilter/nfnetlink_log.c2
-rw-r--r--net/netfilter/nfnetlink_queue.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index 00580a81873..b2bf8f2e01d 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -427,7 +427,7 @@ __build_packet_message(struct nfulnl_instance *inst,
427 nfmsg->version = NFNETLINK_V0; 427 nfmsg->version = NFNETLINK_V0;
428 nfmsg->res_id = htons(inst->group_num); 428 nfmsg->res_id = htons(inst->group_num);
429 429
430 pmsg.hw_protocol = htons(skb->protocol); 430 pmsg.hw_protocol = skb->protocol;
431 pmsg.hook = hooknum; 431 pmsg.hook = hooknum;
432 432
433 NFA_PUT(inst->skb, NFULA_PACKET_HDR, sizeof(pmsg), &pmsg); 433 NFA_PUT(inst->skb, NFULA_PACKET_HDR, sizeof(pmsg), &pmsg);
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index 8eb2473d83e..6e4ada3c184 100644
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -414,7 +414,7 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
414 nfmsg->res_id = htons(queue->queue_num); 414 nfmsg->res_id = htons(queue->queue_num);
415 415
416 pmsg.packet_id = htonl(entry->id); 416 pmsg.packet_id = htonl(entry->id);
417 pmsg.hw_protocol = htons(entskb->protocol); 417 pmsg.hw_protocol = entskb->protocol;
418 pmsg.hook = entinf->hook; 418 pmsg.hook = entinf->hook;
419 419
420 NFA_PUT(skb, NFQA_PACKET_HDR, sizeof(pmsg), &pmsg); 420 NFA_PUT(skb, NFQA_PACKET_HDR, sizeof(pmsg), &pmsg);