aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-11-05 22:10:04 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-11-05 22:10:04 -0500
commitd1ed6a3ea10aa7b199c434f6ffd1b6761896567a (patch)
treead65f11ace691a630885607604e1da0aa16db820
parent59359ff87700f5e742c96a55da9cf0819984c128 (diff)
parent38c94377a36f70e86665231c9f477e445c806618 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [NETLABEL]: Fix build failure. [IPV6]: Give sit driver an appropriate module alias. [IPV6]: Add ndisc_netdev_notifier unregister. [NET]: __alloc_pages() failures reported due to fragmentation [PKTGEN]: TCI endianness fixes [TG3]: Fix 2nd ifup failure on 5752M. [NETFILTER] bug: skb->protocol is already net-endian [NETFILTER] bug: nfulnl_msg_config_mode ->copy_range is 32bit [NETFILTER] bug: NFULA_CFG_QTHRESH uses 32bit [IPV6]: Fix ECN bug on big-endian [IPX]: Annotate and fix IPX checksum [IPX]: Trivial parts of endianness annotations
-rw-r--r--drivers/net/tg3.c8
-rw-r--r--include/linux/ipx.h14
-rw-r--r--include/net/inet_ecn.h2
-rw-r--r--include/net/ipx.h26
-rw-r--r--net/Kconfig3
-rw-r--r--net/core/pktgen.c30
-rw-r--r--net/core/sock.c2
-rw-r--r--net/ipv6/ndisc.c1
-rw-r--r--net/ipv6/sit.c1
-rw-r--r--net/ipx/af_ipx.c85
-rw-r--r--net/ipx/ipx_proc.c12
-rw-r--r--net/ipx/ipx_route.c14
-rw-r--r--net/netfilter/nfnetlink_log.c8
-rw-r--r--net/netfilter/nfnetlink_queue.c2
-rw-r--r--net/netlabel/Kconfig2
15 files changed, 112 insertions, 98 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 8e398499c045..8f059b7968bd 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -68,8 +68,8 @@
68 68
69#define DRV_MODULE_NAME "tg3" 69#define DRV_MODULE_NAME "tg3"
70#define PFX DRV_MODULE_NAME ": " 70#define PFX DRV_MODULE_NAME ": "
71#define DRV_MODULE_VERSION "3.67" 71#define DRV_MODULE_VERSION "3.68"
72#define DRV_MODULE_RELDATE "October 18, 2006" 72#define DRV_MODULE_RELDATE "November 02, 2006"
73 73
74#define TG3_DEF_MAC_MODE 0 74#define TG3_DEF_MAC_MODE 0
75#define TG3_DEF_RX_MODE 0 75#define TG3_DEF_RX_MODE 0
@@ -6014,7 +6014,7 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
6014 tg3_abort_hw(tp, 1); 6014 tg3_abort_hw(tp, 1);
6015 } 6015 }
6016 6016
6017 if ((tp->tg3_flags2 & TG3_FLG2_MII_SERDES) && reset_phy) 6017 if (reset_phy)
6018 tg3_phy_reset(tp); 6018 tg3_phy_reset(tp);
6019 6019
6020 err = tg3_chip_reset(tp); 6020 err = tg3_chip_reset(tp);
@@ -6574,7 +6574,7 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
6574 tw32(GRC_LOCAL_CTRL, tp->grc_local_ctrl); 6574 tw32(GRC_LOCAL_CTRL, tp->grc_local_ctrl);
6575 } 6575 }
6576 6576
6577 err = tg3_setup_phy(tp, reset_phy); 6577 err = tg3_setup_phy(tp, 0);
6578 if (err) 6578 if (err)
6579 return err; 6579 return err;
6580 6580
diff --git a/include/linux/ipx.h b/include/linux/ipx.h
index 4f29c60964c4..eb19b4ea84f4 100644
--- a/include/linux/ipx.h
+++ b/include/linux/ipx.h
@@ -7,8 +7,8 @@
7 7
8struct sockaddr_ipx { 8struct sockaddr_ipx {
9 sa_family_t sipx_family; 9 sa_family_t sipx_family;
10 __u16 sipx_port; 10 __be16 sipx_port;
11 __u32 sipx_network; 11 __be32 sipx_network;
12 unsigned char sipx_node[IPX_NODE_LEN]; 12 unsigned char sipx_node[IPX_NODE_LEN];
13 __u8 sipx_type; 13 __u8 sipx_type;
14 unsigned char sipx_zero; /* 16 byte fill */ 14 unsigned char sipx_zero; /* 16 byte fill */
@@ -23,13 +23,13 @@ struct sockaddr_ipx {
23#define IPX_CRTITF 1 23#define IPX_CRTITF 1
24 24
25struct ipx_route_definition { 25struct ipx_route_definition {
26 __u32 ipx_network; 26 __be32 ipx_network;
27 __u32 ipx_router_network; 27 __be32 ipx_router_network;
28 unsigned char ipx_router_node[IPX_NODE_LEN]; 28 unsigned char ipx_router_node[IPX_NODE_LEN];
29}; 29};
30 30
31struct ipx_interface_definition { 31struct ipx_interface_definition {
32 __u32 ipx_network; 32 __be32 ipx_network;
33 unsigned char ipx_device[16]; 33 unsigned char ipx_device[16];
34 unsigned char ipx_dlink_type; 34 unsigned char ipx_dlink_type;
35#define IPX_FRAME_NONE 0 35#define IPX_FRAME_NONE 0
@@ -55,8 +55,8 @@ struct ipx_config_data {
55 */ 55 */
56 56
57struct ipx_route_def { 57struct ipx_route_def {
58 __u32 ipx_network; 58 __be32 ipx_network;
59 __u32 ipx_router_network; 59 __be32 ipx_router_network;
60#define IPX_ROUTE_NO_ROUTER 0 60#define IPX_ROUTE_NO_ROUTER 0
61 unsigned char ipx_router_node[IPX_NODE_LEN]; 61 unsigned char ipx_router_node[IPX_NODE_LEN];
62 unsigned char ipx_device[16]; 62 unsigned char ipx_device[16];
diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h
index d599c6bfbb86..7849844a4911 100644
--- a/include/net/inet_ecn.h
+++ b/include/net/inet_ecn.h
@@ -48,7 +48,7 @@ static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner)
48 48
49#define IP6_ECN_flow_xmit(sk, label) do { \ 49#define IP6_ECN_flow_xmit(sk, label) do { \
50 if (INET_ECN_is_capable(inet_sk(sk)->tos)) \ 50 if (INET_ECN_is_capable(inet_sk(sk)->tos)) \
51 (label) |= __constant_htons(INET_ECN_ECT_0 << 4); \ 51 (label) |= htonl(INET_ECN_ECT_0 << 20); \
52 } while (0) 52 } while (0)
53 53
54static inline int IP_ECN_set_ce(struct iphdr *iph) 54static inline int IP_ECN_set_ce(struct iphdr *iph)
diff --git a/include/net/ipx.h b/include/net/ipx.h
index 5c0cf33826c5..c6b2ee610866 100644
--- a/include/net/ipx.h
+++ b/include/net/ipx.h
@@ -15,9 +15,9 @@
15#include <linux/list.h> 15#include <linux/list.h>
16 16
17struct ipx_address { 17struct ipx_address {
18 __u32 net; 18 __be32 net;
19 __u8 node[IPX_NODE_LEN]; 19 __u8 node[IPX_NODE_LEN];
20 __u16 sock; 20 __be16 sock;
21}; 21};
22 22
23#define ipx_broadcast_node "\377\377\377\377\377\377" 23#define ipx_broadcast_node "\377\377\377\377\377\377"
@@ -26,9 +26,9 @@ struct ipx_address {
26#define IPX_MAX_PPROP_HOPS 8 26#define IPX_MAX_PPROP_HOPS 8
27 27
28struct ipxhdr { 28struct ipxhdr {
29 __u16 ipx_checksum __attribute__ ((packed)); 29 __be16 ipx_checksum __attribute__ ((packed));
30#define IPX_NO_CHECKSUM 0xFFFF 30#define IPX_NO_CHECKSUM __constant_htons(0xFFFF)
31 __u16 ipx_pktsize __attribute__ ((packed)); 31 __be16 ipx_pktsize __attribute__ ((packed));
32 __u8 ipx_tctrl; 32 __u8 ipx_tctrl;
33 __u8 ipx_type; 33 __u8 ipx_type;
34#define IPX_TYPE_UNKNOWN 0x00 34#define IPX_TYPE_UNKNOWN 0x00
@@ -48,14 +48,14 @@ static __inline__ struct ipxhdr *ipx_hdr(struct sk_buff *skb)
48 48
49struct ipx_interface { 49struct ipx_interface {
50 /* IPX address */ 50 /* IPX address */
51 __u32 if_netnum; 51 __be32 if_netnum;
52 unsigned char if_node[IPX_NODE_LEN]; 52 unsigned char if_node[IPX_NODE_LEN];
53 atomic_t refcnt; 53 atomic_t refcnt;
54 54
55 /* physical device info */ 55 /* physical device info */
56 struct net_device *if_dev; 56 struct net_device *if_dev;
57 struct datalink_proto *if_dlink; 57 struct datalink_proto *if_dlink;
58 unsigned short if_dlink_type; 58 __be16 if_dlink_type;
59 59
60 /* socket support */ 60 /* socket support */
61 unsigned short if_sknum; 61 unsigned short if_sknum;
@@ -71,7 +71,7 @@ struct ipx_interface {
71}; 71};
72 72
73struct ipx_route { 73struct ipx_route {
74 __u32 ir_net; 74 __be32 ir_net;
75 struct ipx_interface *ir_intrfc; 75 struct ipx_interface *ir_intrfc;
76 unsigned char ir_routed; 76 unsigned char ir_routed;
77 unsigned char ir_router_node[IPX_NODE_LEN]; 77 unsigned char ir_router_node[IPX_NODE_LEN];
@@ -82,10 +82,10 @@ struct ipx_route {
82#ifdef __KERNEL__ 82#ifdef __KERNEL__
83struct ipx_cb { 83struct ipx_cb {
84 u8 ipx_tctrl; 84 u8 ipx_tctrl;
85 u32 ipx_dest_net; 85 __be32 ipx_dest_net;
86 u32 ipx_source_net; 86 __be32 ipx_source_net;
87 struct { 87 struct {
88 u32 netnum; 88 __be32 netnum;
89 int index; 89 int index;
90 } last_hop; 90 } last_hop;
91}; 91};
@@ -97,7 +97,7 @@ struct ipx_sock {
97 struct sock sk; 97 struct sock sk;
98 struct ipx_address dest_addr; 98 struct ipx_address dest_addr;
99 struct ipx_interface *intrfc; 99 struct ipx_interface *intrfc;
100 unsigned short port; 100 __be16 port;
101#ifdef CONFIG_IPX_INTERN 101#ifdef CONFIG_IPX_INTERN
102 unsigned char node[IPX_NODE_LEN]; 102 unsigned char node[IPX_NODE_LEN];
103#endif 103#endif
@@ -132,7 +132,7 @@ extern struct ipx_interface *ipx_primary_net;
132extern int ipx_proc_init(void); 132extern int ipx_proc_init(void);
133extern void ipx_proc_exit(void); 133extern void ipx_proc_exit(void);
134 134
135extern const char *ipx_frame_name(unsigned short); 135extern const char *ipx_frame_name(__be16);
136extern const char *ipx_device_name(struct ipx_interface *intrfc); 136extern const char *ipx_device_name(struct ipx_interface *intrfc);
137 137
138static __inline__ void ipxitf_hold(struct ipx_interface *intrfc) 138static __inline__ void ipxitf_hold(struct ipx_interface *intrfc)
diff --git a/net/Kconfig b/net/Kconfig
index a81aca43932f..67e39ad8b8b6 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -63,6 +63,7 @@ config INET
63if INET 63if INET
64source "net/ipv4/Kconfig" 64source "net/ipv4/Kconfig"
65source "net/ipv6/Kconfig" 65source "net/ipv6/Kconfig"
66source "net/netlabel/Kconfig"
66 67
67endif # if INET 68endif # if INET
68 69
@@ -249,8 +250,6 @@ source "net/ieee80211/Kconfig"
249config WIRELESS_EXT 250config WIRELESS_EXT
250 bool 251 bool
251 252
252source "net/netlabel/Kconfig"
253
254config FIB_RULES 253config FIB_RULES
255 bool 254 bool
256 255
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index dd023fd28304..733d86d0a4fb 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2304,6 +2304,12 @@ static void mpls_push(__be32 *mpls, struct pktgen_dev *pkt_dev)
2304 *mpls |= MPLS_STACK_BOTTOM; 2304 *mpls |= MPLS_STACK_BOTTOM;
2305} 2305}
2306 2306
2307static inline __be16 build_tci(unsigned int id, unsigned int cfi,
2308 unsigned int prio)
2309{
2310 return htons(id | (cfi << 12) | (prio << 13));
2311}
2312
2307static struct sk_buff *fill_packet_ipv4(struct net_device *odev, 2313static struct sk_buff *fill_packet_ipv4(struct net_device *odev,
2308 struct pktgen_dev *pkt_dev) 2314 struct pktgen_dev *pkt_dev)
2309{ 2315{
@@ -2353,16 +2359,16 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev,
2353 if (pkt_dev->vlan_id != 0xffff) { 2359 if (pkt_dev->vlan_id != 0xffff) {
2354 if(pkt_dev->svlan_id != 0xffff) { 2360 if(pkt_dev->svlan_id != 0xffff) {
2355 svlan_tci = (__be16 *)skb_put(skb, sizeof(__be16)); 2361 svlan_tci = (__be16 *)skb_put(skb, sizeof(__be16));
2356 *svlan_tci = htons(pkt_dev->svlan_id); 2362 *svlan_tci = build_tci(pkt_dev->svlan_id,
2357 *svlan_tci |= pkt_dev->svlan_p << 5; 2363 pkt_dev->svlan_cfi,
2358 *svlan_tci |= pkt_dev->svlan_cfi << 4; 2364 pkt_dev->svlan_p);
2359 svlan_encapsulated_proto = (__be16 *)skb_put(skb, sizeof(__be16)); 2365 svlan_encapsulated_proto = (__be16 *)skb_put(skb, sizeof(__be16));
2360 *svlan_encapsulated_proto = __constant_htons(ETH_P_8021Q); 2366 *svlan_encapsulated_proto = __constant_htons(ETH_P_8021Q);
2361 } 2367 }
2362 vlan_tci = (__be16 *)skb_put(skb, sizeof(__be16)); 2368 vlan_tci = (__be16 *)skb_put(skb, sizeof(__be16));
2363 *vlan_tci = htons(pkt_dev->vlan_id); 2369 *vlan_tci = build_tci(pkt_dev->vlan_id,
2364 *vlan_tci |= pkt_dev->vlan_p << 5; 2370 pkt_dev->vlan_cfi,
2365 *vlan_tci |= pkt_dev->vlan_cfi << 4; 2371 pkt_dev->vlan_p);
2366 vlan_encapsulated_proto = (__be16 *)skb_put(skb, sizeof(__be16)); 2372 vlan_encapsulated_proto = (__be16 *)skb_put(skb, sizeof(__be16));
2367 *vlan_encapsulated_proto = __constant_htons(ETH_P_IP); 2373 *vlan_encapsulated_proto = __constant_htons(ETH_P_IP);
2368 } 2374 }
@@ -2689,16 +2695,16 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev,
2689 if (pkt_dev->vlan_id != 0xffff) { 2695 if (pkt_dev->vlan_id != 0xffff) {
2690 if(pkt_dev->svlan_id != 0xffff) { 2696 if(pkt_dev->svlan_id != 0xffff) {
2691 svlan_tci = (__be16 *)skb_put(skb, sizeof(__be16)); 2697 svlan_tci = (__be16 *)skb_put(skb, sizeof(__be16));
2692 *svlan_tci = htons(pkt_dev->svlan_id); 2698 *svlan_tci = build_tci(pkt_dev->svlan_id,
2693 *svlan_tci |= pkt_dev->svlan_p << 5; 2699 pkt_dev->svlan_cfi,
2694 *svlan_tci |= pkt_dev->svlan_cfi << 4; 2700 pkt_dev->svlan_p);
2695 svlan_encapsulated_proto = (__be16 *)skb_put(skb, sizeof(__be16)); 2701 svlan_encapsulated_proto = (__be16 *)skb_put(skb, sizeof(__be16));
2696 *svlan_encapsulated_proto = __constant_htons(ETH_P_8021Q); 2702 *svlan_encapsulated_proto = __constant_htons(ETH_P_8021Q);
2697 } 2703 }
2698 vlan_tci = (__be16 *)skb_put(skb, sizeof(__be16)); 2704 vlan_tci = (__be16 *)skb_put(skb, sizeof(__be16));
2699 *vlan_tci = htons(pkt_dev->vlan_id); 2705 *vlan_tci = build_tci(pkt_dev->vlan_id,
2700 *vlan_tci |= pkt_dev->vlan_p << 5; 2706 pkt_dev->vlan_cfi,
2701 *vlan_tci |= pkt_dev->vlan_cfi << 4; 2707 pkt_dev->vlan_p);
2702 vlan_encapsulated_proto = (__be16 *)skb_put(skb, sizeof(__be16)); 2708 vlan_encapsulated_proto = (__be16 *)skb_put(skb, sizeof(__be16));
2703 *vlan_encapsulated_proto = __constant_htons(ETH_P_IPV6); 2709 *vlan_encapsulated_proto = __constant_htons(ETH_P_IPV6);
2704 } 2710 }
diff --git a/net/core/sock.c b/net/core/sock.c
index d472db4776c3..ee6cd2541d35 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1160,7 +1160,7 @@ static struct sk_buff *sock_alloc_send_pskb(struct sock *sk,
1160 goto failure; 1160 goto failure;
1161 1161
1162 if (atomic_read(&sk->sk_wmem_alloc) < sk->sk_sndbuf) { 1162 if (atomic_read(&sk->sk_wmem_alloc) < sk->sk_sndbuf) {
1163 skb = alloc_skb(header_len, sk->sk_allocation); 1163 skb = alloc_skb(header_len, gfp_mask);
1164 if (skb) { 1164 if (skb) {
1165 int npages; 1165 int npages;
1166 int i; 1166 int i;
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 41a8a5f06602..73eb8c33e9f0 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -1742,6 +1742,7 @@ int __init ndisc_init(struct net_proto_family *ops)
1742 1742
1743void ndisc_cleanup(void) 1743void ndisc_cleanup(void)
1744{ 1744{
1745 unregister_netdevice_notifier(&ndisc_netdev_notifier);
1745#ifdef CONFIG_SYSCTL 1746#ifdef CONFIG_SYSCTL
1746 neigh_sysctl_unregister(&nd_tbl.parms); 1747 neigh_sysctl_unregister(&nd_tbl.parms);
1747#endif 1748#endif
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index b481a4d780c2..be699f85b2c7 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -854,3 +854,4 @@ int __init sit_init(void)
854module_init(sit_init); 854module_init(sit_init);
855module_exit(sit_cleanup); 855module_exit(sit_cleanup);
856MODULE_LICENSE("GPL"); 856MODULE_LICENSE("GPL");
857MODULE_ALIAS("sit0");
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
index bef3f61569f7..76c661566dfd 100644
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -83,13 +83,13 @@ DEFINE_SPINLOCK(ipx_interfaces_lock);
83struct ipx_interface *ipx_primary_net; 83struct ipx_interface *ipx_primary_net;
84struct ipx_interface *ipx_internal_net; 84struct ipx_interface *ipx_internal_net;
85 85
86extern int ipxrtr_add_route(__u32 network, struct ipx_interface *intrfc, 86extern int ipxrtr_add_route(__be32 network, struct ipx_interface *intrfc,
87 unsigned char *node); 87 unsigned char *node);
88extern void ipxrtr_del_routes(struct ipx_interface *intrfc); 88extern void ipxrtr_del_routes(struct ipx_interface *intrfc);
89extern int ipxrtr_route_packet(struct sock *sk, struct sockaddr_ipx *usipx, 89extern int ipxrtr_route_packet(struct sock *sk, struct sockaddr_ipx *usipx,
90 struct iovec *iov, int len, int noblock); 90 struct iovec *iov, int len, int noblock);
91extern int ipxrtr_route_skb(struct sk_buff *skb); 91extern int ipxrtr_route_skb(struct sk_buff *skb);
92extern struct ipx_route *ipxrtr_lookup(__u32 net); 92extern struct ipx_route *ipxrtr_lookup(__be32 net);
93extern int ipxrtr_ioctl(unsigned int cmd, void __user *arg); 93extern int ipxrtr_ioctl(unsigned int cmd, void __user *arg);
94 94
95#undef IPX_REFCNT_DEBUG 95#undef IPX_REFCNT_DEBUG
@@ -177,7 +177,7 @@ static void ipxitf_clear_primary_net(void)
177} 177}
178 178
179static struct ipx_interface *__ipxitf_find_using_phys(struct net_device *dev, 179static struct ipx_interface *__ipxitf_find_using_phys(struct net_device *dev,
180 unsigned short datalink) 180 __be16 datalink)
181{ 181{
182 struct ipx_interface *i; 182 struct ipx_interface *i;
183 183
@@ -190,7 +190,7 @@ out:
190} 190}
191 191
192static struct ipx_interface *ipxitf_find_using_phys(struct net_device *dev, 192static struct ipx_interface *ipxitf_find_using_phys(struct net_device *dev,
193 unsigned short datalink) 193 __be16 datalink)
194{ 194{
195 struct ipx_interface *i; 195 struct ipx_interface *i;
196 196
@@ -202,7 +202,7 @@ static struct ipx_interface *ipxitf_find_using_phys(struct net_device *dev,
202 return i; 202 return i;
203} 203}
204 204
205struct ipx_interface *ipxitf_find_using_net(__u32 net) 205struct ipx_interface *ipxitf_find_using_net(__be32 net)
206{ 206{
207 struct ipx_interface *i; 207 struct ipx_interface *i;
208 208
@@ -237,7 +237,7 @@ static void ipxitf_insert_socket(struct ipx_interface *intrfc, struct sock *sk)
237 237
238/* caller must hold intrfc->if_sklist_lock */ 238/* caller must hold intrfc->if_sklist_lock */
239static struct sock *__ipxitf_find_socket(struct ipx_interface *intrfc, 239static struct sock *__ipxitf_find_socket(struct ipx_interface *intrfc,
240 unsigned short port) 240 __be16 port)
241{ 241{
242 struct sock *s; 242 struct sock *s;
243 struct hlist_node *node; 243 struct hlist_node *node;
@@ -252,7 +252,7 @@ found:
252 252
253/* caller must hold a reference to intrfc */ 253/* caller must hold a reference to intrfc */
254static struct sock *ipxitf_find_socket(struct ipx_interface *intrfc, 254static struct sock *ipxitf_find_socket(struct ipx_interface *intrfc,
255 unsigned short port) 255 __be16 port)
256{ 256{
257 struct sock *s; 257 struct sock *s;
258 258
@@ -268,7 +268,7 @@ static struct sock *ipxitf_find_socket(struct ipx_interface *intrfc,
268#ifdef CONFIG_IPX_INTERN 268#ifdef CONFIG_IPX_INTERN
269static struct sock *ipxitf_find_internal_socket(struct ipx_interface *intrfc, 269static struct sock *ipxitf_find_internal_socket(struct ipx_interface *intrfc,
270 unsigned char *ipx_node, 270 unsigned char *ipx_node,
271 unsigned short port) 271 __be16 port)
272{ 272{
273 struct sock *s; 273 struct sock *s;
274 struct hlist_node *node; 274 struct hlist_node *node;
@@ -600,10 +600,10 @@ int ipxitf_send(struct ipx_interface *intrfc, struct sk_buff *skb, char *node)
600 600
601 /* see if we need to include the netnum in the route list */ 601 /* see if we need to include the netnum in the route list */
602 if (IPX_SKB_CB(skb)->last_hop.index >= 0) { 602 if (IPX_SKB_CB(skb)->last_hop.index >= 0) {
603 u32 *last_hop = (u32 *)(((u8 *) skb->data) + 603 __be32 *last_hop = (__be32 *)(((u8 *) skb->data) +
604 sizeof(struct ipxhdr) + 604 sizeof(struct ipxhdr) +
605 IPX_SKB_CB(skb)->last_hop.index * 605 IPX_SKB_CB(skb)->last_hop.index *
606 sizeof(u32)); 606 sizeof(__be32));
607 *last_hop = IPX_SKB_CB(skb)->last_hop.netnum; 607 *last_hop = IPX_SKB_CB(skb)->last_hop.netnum;
608 IPX_SKB_CB(skb)->last_hop.index = -1; 608 IPX_SKB_CB(skb)->last_hop.index = -1;
609 } 609 }
@@ -772,7 +772,7 @@ static void ipxitf_discover_netnum(struct ipx_interface *intrfc,
772 } else { 772 } else {
773 printk(KERN_WARNING "IPX: Network number collision " 773 printk(KERN_WARNING "IPX: Network number collision "
774 "%lx\n %s %s and %s %s\n", 774 "%lx\n %s %s and %s %s\n",
775 (unsigned long) htonl(cb->ipx_source_net), 775 (unsigned long) ntohl(cb->ipx_source_net),
776 ipx_device_name(i), 776 ipx_device_name(i),
777 ipx_frame_name(i->if_dlink_type), 777 ipx_frame_name(i->if_dlink_type),
778 ipx_device_name(intrfc), 778 ipx_device_name(intrfc),
@@ -812,7 +812,7 @@ static int ipxitf_pprop(struct ipx_interface *intrfc, struct sk_buff *skb)
812 int i, rc = -EINVAL; 812 int i, rc = -EINVAL;
813 struct ipx_interface *ifcs; 813 struct ipx_interface *ifcs;
814 char *c; 814 char *c;
815 u32 *l; 815 __be32 *l;
816 816
817 /* Illegal packet - too many hops or too short */ 817 /* Illegal packet - too many hops or too short */
818 /* We decide to throw it away: no broadcasting, no local processing. 818 /* We decide to throw it away: no broadcasting, no local processing.
@@ -833,7 +833,7 @@ static int ipxitf_pprop(struct ipx_interface *intrfc, struct sk_buff *skb)
833 goto out; 833 goto out;
834 834
835 c = ((u8 *) ipx) + sizeof(struct ipxhdr); 835 c = ((u8 *) ipx) + sizeof(struct ipxhdr);
836 l = (u32 *) c; 836 l = (__be32 *) c;
837 837
838 /* Don't broadcast packet if already seen this net */ 838 /* Don't broadcast packet if already seen this net */
839 for (i = 0; i < IPX_SKB_CB(skb)->ipx_tctrl; i++) 839 for (i = 0; i < IPX_SKB_CB(skb)->ipx_tctrl; i++)
@@ -855,7 +855,7 @@ static int ipxitf_pprop(struct ipx_interface *intrfc, struct sk_buff *skb)
855 /* That aren't in the list */ 855 /* That aren't in the list */
856 if (ifcs == intrfc) 856 if (ifcs == intrfc)
857 continue; 857 continue;
858 l = (__u32 *) c; 858 l = (__be32 *) c;
859 /* don't consider the last entry in the packet list, 859 /* don't consider the last entry in the packet list,
860 * it is our netnum, and it is not there yet */ 860 * it is our netnum, and it is not there yet */
861 for (i = 0; i < IPX_SKB_CB(skb)->ipx_tctrl; i++) 861 for (i = 0; i < IPX_SKB_CB(skb)->ipx_tctrl; i++)
@@ -885,8 +885,8 @@ static void ipxitf_insert(struct ipx_interface *intrfc)
885 ipx_primary_net = intrfc; 885 ipx_primary_net = intrfc;
886} 886}
887 887
888static struct ipx_interface *ipxitf_alloc(struct net_device *dev, __u32 netnum, 888static struct ipx_interface *ipxitf_alloc(struct net_device *dev, __be32 netnum,
889 unsigned short dlink_type, 889 __be16 dlink_type,
890 struct datalink_proto *dlink, 890 struct datalink_proto *dlink,
891 unsigned char internal, 891 unsigned char internal,
892 int ipx_offset) 892 int ipx_offset)
@@ -960,7 +960,7 @@ static __be16 ipx_map_frame_type(unsigned char type)
960static int ipxitf_create(struct ipx_interface_definition *idef) 960static int ipxitf_create(struct ipx_interface_definition *idef)
961{ 961{
962 struct net_device *dev; 962 struct net_device *dev;
963 unsigned short dlink_type = 0; 963 __be16 dlink_type = 0;
964 struct datalink_proto *datalink = NULL; 964 struct datalink_proto *datalink = NULL;
965 struct ipx_interface *intrfc; 965 struct ipx_interface *intrfc;
966 int rc; 966 int rc;
@@ -1073,7 +1073,7 @@ out:
1073static int ipxitf_delete(struct ipx_interface_definition *idef) 1073static int ipxitf_delete(struct ipx_interface_definition *idef)
1074{ 1074{
1075 struct net_device *dev = NULL; 1075 struct net_device *dev = NULL;
1076 unsigned short dlink_type = 0; 1076 __be16 dlink_type = 0;
1077 struct ipx_interface *intrfc; 1077 struct ipx_interface *intrfc;
1078 int rc = 0; 1078 int rc = 0;
1079 1079
@@ -1110,7 +1110,7 @@ out:
1110} 1110}
1111 1111
1112static struct ipx_interface *ipxitf_auto_create(struct net_device *dev, 1112static struct ipx_interface *ipxitf_auto_create(struct net_device *dev,
1113 unsigned short dlink_type) 1113 __be16 dlink_type)
1114{ 1114{
1115 struct ipx_interface *intrfc = NULL; 1115 struct ipx_interface *intrfc = NULL;
1116 struct datalink_proto *datalink; 1116 struct datalink_proto *datalink;
@@ -1122,7 +1122,7 @@ static struct ipx_interface *ipxitf_auto_create(struct net_device *dev,
1122 if (dev->addr_len > IPX_NODE_LEN) 1122 if (dev->addr_len > IPX_NODE_LEN)
1123 goto out; 1123 goto out;
1124 1124
1125 switch (htons(dlink_type)) { 1125 switch (ntohs(dlink_type)) {
1126 case ETH_P_IPX: datalink = pEII_datalink; break; 1126 case ETH_P_IPX: datalink = pEII_datalink; break;
1127 case ETH_P_802_2: datalink = p8022_datalink; break; 1127 case ETH_P_802_2: datalink = p8022_datalink; break;
1128 case ETH_P_SNAP: datalink = pSNAP_datalink; break; 1128 case ETH_P_SNAP: datalink = pSNAP_datalink; break;
@@ -1234,27 +1234,27 @@ static int ipxitf_ioctl(unsigned int cmd, void __user *arg)
1234/* Note: We assume ipx_tctrl==0 and htons(length)==ipx_pktsize */ 1234/* Note: We assume ipx_tctrl==0 and htons(length)==ipx_pktsize */
1235/* This functions should *not* mess with packet contents */ 1235/* This functions should *not* mess with packet contents */
1236 1236
1237__u16 ipx_cksum(struct ipxhdr *packet, int length) 1237__be16 ipx_cksum(struct ipxhdr *packet, int length)
1238{ 1238{
1239 /* 1239 /*
1240 * NOTE: sum is a net byte order quantity, which optimizes the 1240 * NOTE: sum is a net byte order quantity, which optimizes the
1241 * loop. This only works on big and little endian machines. (I 1241 * loop. This only works on big and little endian machines. (I
1242 * don't know of a machine that isn't.) 1242 * don't know of a machine that isn't.)
1243 */ 1243 */
1244 /* start at ipx_dest - We skip the checksum field and start with 1244 /* handle the first 3 words separately; checksum should be skipped
1245 * ipx_type before the loop, not considering ipx_tctrl in the calc */ 1245 * and ipx_tctrl masked out */
1246 __u16 *p = (__u16 *)&packet->ipx_dest; 1246 __u16 *p = (__u16 *)packet;
1247 __u32 i = (length >> 1) - 1; /* Number of complete words */ 1247 __u32 sum = p[1] + (p[2] & (__force u16)htons(0x00ff));
1248 __u32 sum = packet->ipx_type << sizeof(packet->ipx_tctrl); 1248 __u32 i = (length >> 1) - 3; /* Number of remaining complete words */
1249 1249
1250 /* Loop through all complete words except the checksum field, 1250 /* Loop through them */
1251 * ipx_type (accounted above) and ipx_tctrl (not used in the cksum) */ 1251 p += 3;
1252 while (--i) 1252 while (i--)
1253 sum += *p++; 1253 sum += *p++;
1254 1254
1255 /* Add on the last part word if it exists */ 1255 /* Add on the last part word if it exists */
1256 if (packet->ipx_pktsize & htons(1)) 1256 if (packet->ipx_pktsize & htons(1))
1257 sum += ntohs(0xff00) & *p; 1257 sum += (__force u16)htons(0xff00) & *p;
1258 1258
1259 /* Do final fixup */ 1259 /* Do final fixup */
1260 sum = (sum & 0xffff) + (sum >> 16); 1260 sum = (sum & 0xffff) + (sum >> 16);
@@ -1263,10 +1263,17 @@ __u16 ipx_cksum(struct ipxhdr *packet, int length)
1263 if (sum >= 0x10000) 1263 if (sum >= 0x10000)
1264 sum++; 1264 sum++;
1265 1265
1266 return ~sum; 1266 /*
1267 * Leave 0 alone; we don't want 0xffff here. Note that we can't get
1268 * here with 0x10000, so this check is the same as ((__u16)sum)
1269 */
1270 if (sum)
1271 sum = ~sum;
1272
1273 return (__force __be16)sum;
1267} 1274}
1268 1275
1269const char *ipx_frame_name(unsigned short frame) 1276const char *ipx_frame_name(__be16 frame)
1270{ 1277{
1271 char* rc = "None"; 1278 char* rc = "None";
1272 1279
@@ -1401,7 +1408,7 @@ out:
1401 1408
1402/* caller must hold a reference to intrfc */ 1409/* caller must hold a reference to intrfc */
1403 1410
1404static unsigned short ipx_first_free_socketnum(struct ipx_interface *intrfc) 1411static __be16 ipx_first_free_socketnum(struct ipx_interface *intrfc)
1405{ 1412{
1406 unsigned short socketNum = intrfc->if_sknum; 1413 unsigned short socketNum = intrfc->if_sknum;
1407 1414
@@ -1410,7 +1417,7 @@ static unsigned short ipx_first_free_socketnum(struct ipx_interface *intrfc)
1410 if (socketNum < IPX_MIN_EPHEMERAL_SOCKET) 1417 if (socketNum < IPX_MIN_EPHEMERAL_SOCKET)
1411 socketNum = IPX_MIN_EPHEMERAL_SOCKET; 1418 socketNum = IPX_MIN_EPHEMERAL_SOCKET;
1412 1419
1413 while (__ipxitf_find_socket(intrfc, ntohs(socketNum))) 1420 while (__ipxitf_find_socket(intrfc, htons(socketNum)))
1414 if (socketNum > IPX_MAX_EPHEMERAL_SOCKET) 1421 if (socketNum > IPX_MAX_EPHEMERAL_SOCKET)
1415 socketNum = IPX_MIN_EPHEMERAL_SOCKET; 1422 socketNum = IPX_MIN_EPHEMERAL_SOCKET;
1416 else 1423 else
@@ -1419,7 +1426,7 @@ static unsigned short ipx_first_free_socketnum(struct ipx_interface *intrfc)
1419 spin_unlock_bh(&intrfc->if_sklist_lock); 1426 spin_unlock_bh(&intrfc->if_sklist_lock);
1420 intrfc->if_sknum = socketNum; 1427 intrfc->if_sknum = socketNum;
1421 1428
1422 return ntohs(socketNum); 1429 return htons(socketNum);
1423} 1430}
1424 1431
1425static int ipx_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) 1432static int ipx_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
@@ -1473,7 +1480,7 @@ static int ipx_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
1473 ipxs->port)) { 1480 ipxs->port)) {
1474 SOCK_DEBUG(sk, 1481 SOCK_DEBUG(sk,
1475 "IPX: bind failed because port %X in use.\n", 1482 "IPX: bind failed because port %X in use.\n",
1476 ntohs((int)addr->sipx_port)); 1483 ntohs(addr->sipx_port));
1477 goto out_put; 1484 goto out_put;
1478 } 1485 }
1479 } else { 1486 } else {
@@ -1488,7 +1495,7 @@ static int ipx_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
1488 if (ipxitf_find_socket(intrfc, addr->sipx_port)) { 1495 if (ipxitf_find_socket(intrfc, addr->sipx_port)) {
1489 SOCK_DEBUG(sk, 1496 SOCK_DEBUG(sk,
1490 "IPX: bind failed because port %X in use.\n", 1497 "IPX: bind failed because port %X in use.\n",
1491 ntohs((int)addr->sipx_port)); 1498 ntohs(addr->sipx_port));
1492 goto out_put; 1499 goto out_put;
1493 } 1500 }
1494 } 1501 }
@@ -1665,7 +1672,7 @@ static int ipx_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_ty
1665 intrfc = ipxitf_find_using_phys(dev, pt->type); 1672 intrfc = ipxitf_find_using_phys(dev, pt->type);
1666 if (!intrfc) { 1673 if (!intrfc) {
1667 if (ipxcfg_auto_create_interfaces && 1674 if (ipxcfg_auto_create_interfaces &&
1668 ntohl(IPX_SKB_CB(skb)->ipx_dest_net)) { 1675 IPX_SKB_CB(skb)->ipx_dest_net) {
1669 intrfc = ipxitf_auto_create(dev, pt->type); 1676 intrfc = ipxitf_auto_create(dev, pt->type);
1670 if (intrfc) 1677 if (intrfc)
1671 ipxitf_hold(intrfc); 1678 ipxitf_hold(intrfc);
diff --git a/net/ipx/ipx_proc.c b/net/ipx/ipx_proc.c
index 4c0c71206e54..b7463dfca63e 100644
--- a/net/ipx/ipx_proc.c
+++ b/net/ipx/ipx_proc.c
@@ -260,22 +260,22 @@ static int ipx_seq_socket_show(struct seq_file *seq, void *v)
260 ipxs = ipx_sk(s); 260 ipxs = ipx_sk(s);
261#ifdef CONFIG_IPX_INTERN 261#ifdef CONFIG_IPX_INTERN
262 seq_printf(seq, "%08lX:%02X%02X%02X%02X%02X%02X:%04X ", 262 seq_printf(seq, "%08lX:%02X%02X%02X%02X%02X%02X:%04X ",
263 (unsigned long)htonl(ipxs->intrfc->if_netnum), 263 (unsigned long)ntohl(ipxs->intrfc->if_netnum),
264 ipxs->node[0], ipxs->node[1], ipxs->node[2], ipxs->node[3], 264 ipxs->node[0], ipxs->node[1], ipxs->node[2], ipxs->node[3],
265 ipxs->node[4], ipxs->node[5], htons(ipxs->port)); 265 ipxs->node[4], ipxs->node[5], ntohs(ipxs->port));
266#else 266#else
267 seq_printf(seq, "%08lX:%04X ", (unsigned long) htonl(ipxs->intrfc->if_netnum), 267 seq_printf(seq, "%08lX:%04X ", (unsigned long) ntohl(ipxs->intrfc->if_netnum),
268 htons(ipxs->port)); 268 ntohs(ipxs->port));
269#endif /* CONFIG_IPX_INTERN */ 269#endif /* CONFIG_IPX_INTERN */
270 if (s->sk_state != TCP_ESTABLISHED) 270 if (s->sk_state != TCP_ESTABLISHED)
271 seq_printf(seq, "%-28s", "Not_Connected"); 271 seq_printf(seq, "%-28s", "Not_Connected");
272 else { 272 else {
273 seq_printf(seq, "%08lX:%02X%02X%02X%02X%02X%02X:%04X ", 273 seq_printf(seq, "%08lX:%02X%02X%02X%02X%02X%02X:%04X ",
274 (unsigned long)htonl(ipxs->dest_addr.net), 274 (unsigned long)ntohl(ipxs->dest_addr.net),
275 ipxs->dest_addr.node[0], ipxs->dest_addr.node[1], 275 ipxs->dest_addr.node[0], ipxs->dest_addr.node[1],
276 ipxs->dest_addr.node[2], ipxs->dest_addr.node[3], 276 ipxs->dest_addr.node[2], ipxs->dest_addr.node[3],
277 ipxs->dest_addr.node[4], ipxs->dest_addr.node[5], 277 ipxs->dest_addr.node[4], ipxs->dest_addr.node[5],
278 htons(ipxs->dest_addr.sock)); 278 ntohs(ipxs->dest_addr.sock));
279 } 279 }
280 280
281 seq_printf(seq, "%08X %08X %02X %03d\n", 281 seq_printf(seq, "%08X %08X %02X %03d\n",
diff --git a/net/ipx/ipx_route.c b/net/ipx/ipx_route.c
index a30dbb1e08fb..68560ee0d797 100644
--- a/net/ipx/ipx_route.c
+++ b/net/ipx/ipx_route.c
@@ -19,17 +19,17 @@ DEFINE_RWLOCK(ipx_routes_lock);
19 19
20extern struct ipx_interface *ipx_internal_net; 20extern struct ipx_interface *ipx_internal_net;
21 21
22extern __u16 ipx_cksum(struct ipxhdr *packet, int length); 22extern __be16 ipx_cksum(struct ipxhdr *packet, int length);
23extern struct ipx_interface *ipxitf_find_using_net(__u32 net); 23extern struct ipx_interface *ipxitf_find_using_net(__be32 net);
24extern int ipxitf_demux_socket(struct ipx_interface *intrfc, 24extern int ipxitf_demux_socket(struct ipx_interface *intrfc,
25 struct sk_buff *skb, int copy); 25 struct sk_buff *skb, int copy);
26extern int ipxitf_demux_socket(struct ipx_interface *intrfc, 26extern int ipxitf_demux_socket(struct ipx_interface *intrfc,
27 struct sk_buff *skb, int copy); 27 struct sk_buff *skb, int copy);
28extern int ipxitf_send(struct ipx_interface *intrfc, struct sk_buff *skb, 28extern int ipxitf_send(struct ipx_interface *intrfc, struct sk_buff *skb,
29 char *node); 29 char *node);
30extern struct ipx_interface *ipxitf_find_using_net(__u32 net); 30extern struct ipx_interface *ipxitf_find_using_net(__be32 net);
31 31
32struct ipx_route *ipxrtr_lookup(__u32 net) 32struct ipx_route *ipxrtr_lookup(__be32 net)
33{ 33{
34 struct ipx_route *r; 34 struct ipx_route *r;
35 35
@@ -48,7 +48,7 @@ unlock:
48/* 48/*
49 * Caller must hold a reference to intrfc 49 * Caller must hold a reference to intrfc
50 */ 50 */
51int ipxrtr_add_route(__u32 network, struct ipx_interface *intrfc, 51int ipxrtr_add_route(__be32 network, struct ipx_interface *intrfc,
52 unsigned char *node) 52 unsigned char *node)
53{ 53{
54 struct ipx_route *rt; 54 struct ipx_route *rt;
@@ -118,7 +118,7 @@ out:
118 return rc; 118 return rc;
119} 119}
120 120
121static int ipxrtr_delete(__u32 net) 121static int ipxrtr_delete(__be32 net)
122{ 122{
123 struct ipx_route *r, *tmp; 123 struct ipx_route *r, *tmp;
124 int rc; 124 int rc;
@@ -238,7 +238,7 @@ int ipxrtr_route_packet(struct sock *sk, struct sockaddr_ipx *usipx,
238 238
239 /* Apply checksum. Not allowed on 802.3 links. */ 239 /* Apply checksum. Not allowed on 802.3 links. */
240 if (sk->sk_no_check || intrfc->if_dlink_type == htons(IPX_FRAME_8023)) 240 if (sk->sk_no_check || intrfc->if_dlink_type == htons(IPX_FRAME_8023))
241 ipx->ipx_checksum = 0xFFFF; 241 ipx->ipx_checksum = htons(0xFFFF);
242 else 242 else
243 ipx->ipx_checksum = ipx_cksum(ipx, len + sizeof(struct ipxhdr)); 243 ipx->ipx_checksum = ipx_cksum(ipx, len + sizeof(struct ipxhdr));
244 244
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index b59d3b2bde21..b2bf8f2e01da 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);
@@ -878,7 +878,7 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
878 params = NFA_DATA(nfula[NFULA_CFG_MODE-1]); 878 params = NFA_DATA(nfula[NFULA_CFG_MODE-1]);
879 879
880 nfulnl_set_mode(inst, params->copy_mode, 880 nfulnl_set_mode(inst, params->copy_mode,
881 ntohs(params->copy_range)); 881 ntohl(params->copy_range));
882 } 882 }
883 883
884 if (nfula[NFULA_CFG_TIMEOUT-1]) { 884 if (nfula[NFULA_CFG_TIMEOUT-1]) {
@@ -896,8 +896,8 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
896 } 896 }
897 897
898 if (nfula[NFULA_CFG_QTHRESH-1]) { 898 if (nfula[NFULA_CFG_QTHRESH-1]) {
899 u_int32_t qthresh = 899 __be32 qthresh =
900 *(u_int16_t *)NFA_DATA(nfula[NFULA_CFG_QTHRESH-1]); 900 *(__be32 *)NFA_DATA(nfula[NFULA_CFG_QTHRESH-1]);
901 901
902 nfulnl_set_qthresh(inst, ntohl(qthresh)); 902 nfulnl_set_qthresh(inst, ntohl(qthresh));
903 } 903 }
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index 8eb2473d83e1..6e4ada3c1844 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);
diff --git a/net/netlabel/Kconfig b/net/netlabel/Kconfig
index 9f7121ae13e9..56958c85f2b4 100644
--- a/net/netlabel/Kconfig
+++ b/net/netlabel/Kconfig
@@ -4,7 +4,7 @@
4 4
5config NETLABEL 5config NETLABEL
6 bool "NetLabel subsystem support" 6 bool "NetLabel subsystem support"
7 depends on NET && SECURITY 7 depends on SECURITY
8 default n 8 default n
9 ---help--- 9 ---help---
10 NetLabel provides support for explicit network packet labeling 10 NetLabel provides support for explicit network packet labeling