aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/atm/br2684.c2
-rw-r--r--net/bridge/br_input.c2
-rw-r--r--net/bridge/br_netfilter.c13
-rw-r--r--net/core/filter.c6
-rw-r--r--net/core/pktgen.c5
-rw-r--r--net/core/utils.c2
-rw-r--r--net/ethernet/eth.c2
-rw-r--r--net/ipv4/ip_fragment.c2
-rw-r--r--net/ipv4/ip_output.c4
-rw-r--r--net/ipv4/ipvs/ip_vs_xmit.c2
-rw-r--r--net/ipv4/netfilter/ipt_helper.c1
-rw-r--r--net/x25/af_x25.c7
-rw-r--r--net/xfrm/xfrm_user.c1
13 files changed, 25 insertions, 24 deletions
diff --git a/net/atm/br2684.c b/net/atm/br2684.c
index 72f3f7b8de80..bdb4d89730d2 100644
--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -295,7 +295,7 @@ static inline __be16 br_type_trans(struct sk_buff *skb, struct net_device *dev)
295 unsigned char *rawp; 295 unsigned char *rawp;
296 eth = eth_hdr(skb); 296 eth = eth_hdr(skb);
297 297
298 if (*eth->h_dest & 1) { 298 if (is_multicast_ether_addr(eth->h_dest)) {
299 if (memcmp(eth->h_dest, dev->broadcast, ETH_ALEN) == 0) 299 if (memcmp(eth->h_dest, dev->broadcast, ETH_ALEN) == 0)
300 skb->pkt_type = PACKET_BROADCAST; 300 skb->pkt_type = PACKET_BROADCAST;
301 else 301 else
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index c387852f753a..e3a73cead6b6 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -68,7 +68,7 @@ int br_handle_frame_finish(struct sk_buff *skb)
68 } 68 }
69 } 69 }
70 70
71 if (dest[0] & 1) { 71 if (is_multicast_ether_addr(dest)) {
72 br_flood_forward(br, skb, !passedup); 72 br_flood_forward(br, skb, !passedup);
73 if (!passedup) 73 if (!passedup)
74 br_pass_frame_up(br, skb); 74 br_pass_frame_up(br, skb);
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 223f8270daee..7cac3fb9f809 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -394,8 +394,9 @@ inhdr_error:
394 * target in particular. Save the original destination IP 394 * target in particular. Save the original destination IP
395 * address to be able to detect DNAT afterwards. */ 395 * address to be able to detect DNAT afterwards. */
396static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff **pskb, 396static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff **pskb,
397 const struct net_device *in, const struct net_device *out, 397 const struct net_device *in,
398 int (*okfn)(struct sk_buff *)) 398 const struct net_device *out,
399 int (*okfn)(struct sk_buff *))
399{ 400{
400 struct iphdr *iph; 401 struct iphdr *iph;
401 __u32 len; 402 __u32 len;
@@ -412,8 +413,10 @@ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff **pskb,
412 goto out; 413 goto out;
413 414
414 if (skb->protocol == __constant_htons(ETH_P_8021Q)) { 415 if (skb->protocol == __constant_htons(ETH_P_8021Q)) {
416 u8 *vhdr = skb->data;
415 skb_pull(skb, VLAN_HLEN); 417 skb_pull(skb, VLAN_HLEN);
416 (skb)->nh.raw += VLAN_HLEN; 418 skb_postpull_rcsum(skb, vhdr, VLAN_HLEN);
419 skb->nh.raw += VLAN_HLEN;
417 } 420 }
418 return br_nf_pre_routing_ipv6(hook, skb, in, out, okfn); 421 return br_nf_pre_routing_ipv6(hook, skb, in, out, okfn);
419 } 422 }
@@ -429,8 +432,10 @@ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff **pskb,
429 goto out; 432 goto out;
430 433
431 if (skb->protocol == __constant_htons(ETH_P_8021Q)) { 434 if (skb->protocol == __constant_htons(ETH_P_8021Q)) {
435 u8 *vhdr = skb->data;
432 skb_pull(skb, VLAN_HLEN); 436 skb_pull(skb, VLAN_HLEN);
433 (skb)->nh.raw += VLAN_HLEN; 437 skb_postpull_rcsum(skb, vhdr, VLAN_HLEN);
438 skb->nh.raw += VLAN_HLEN;
434 } 439 }
435 440
436 if (!pskb_may_pull(skb, sizeof(struct iphdr))) 441 if (!pskb_may_pull(skb, sizeof(struct iphdr)))
diff --git a/net/core/filter.c b/net/core/filter.c
index 8964d3445588..9eb9d0017a01 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -75,7 +75,7 @@ static inline void *load_pointer(struct sk_buff *skb, int k,
75 * len is the number of filter blocks in the array. 75 * len is the number of filter blocks in the array.
76 */ 76 */
77 77
78int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen) 78unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen)
79{ 79{
80 struct sock_filter *fentry; /* We walk down these */ 80 struct sock_filter *fentry; /* We walk down these */
81 void *ptr; 81 void *ptr;
@@ -241,9 +241,9 @@ load_b:
241 A = X; 241 A = X;
242 continue; 242 continue;
243 case BPF_RET|BPF_K: 243 case BPF_RET|BPF_K:
244 return ((unsigned int)fentry->k); 244 return fentry->k;
245 case BPF_RET|BPF_A: 245 case BPF_RET|BPF_A:
246 return ((unsigned int)A); 246 return A;
247 case BPF_ST: 247 case BPF_ST:
248 mem[fentry->k] = A; 248 mem[fentry->k] = A;
249 continue; 249 continue;
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 06cad2d63e8a..631056d44b7b 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -473,7 +473,6 @@ static char version[] __initdata = VERSION;
473 473
474static int pktgen_remove_device(struct pktgen_thread* t, struct pktgen_dev *i); 474static int pktgen_remove_device(struct pktgen_thread* t, struct pktgen_dev *i);
475static int pktgen_add_device(struct pktgen_thread* t, const char* ifname); 475static int pktgen_add_device(struct pktgen_thread* t, const char* ifname);
476static struct pktgen_thread* pktgen_find_thread(const char* name);
477static struct pktgen_dev *pktgen_find_dev(struct pktgen_thread* t, const char* ifname); 476static struct pktgen_dev *pktgen_find_dev(struct pktgen_thread* t, const char* ifname);
478static int pktgen_device_event(struct notifier_block *, unsigned long, void *); 477static int pktgen_device_event(struct notifier_block *, unsigned long, void *);
479static void pktgen_run_all_threads(void); 478static void pktgen_run_all_threads(void);
@@ -2883,7 +2882,7 @@ static int pktgen_add_device(struct pktgen_thread *t, const char* ifname)
2883 return add_dev_to_thread(t, pkt_dev); 2882 return add_dev_to_thread(t, pkt_dev);
2884} 2883}
2885 2884
2886static struct pktgen_thread *pktgen_find_thread(const char* name) 2885static struct pktgen_thread * __init pktgen_find_thread(const char* name)
2887{ 2886{
2888 struct pktgen_thread *t = NULL; 2887 struct pktgen_thread *t = NULL;
2889 2888
@@ -2900,7 +2899,7 @@ static struct pktgen_thread *pktgen_find_thread(const char* name)
2900 return t; 2899 return t;
2901} 2900}
2902 2901
2903static int pktgen_create_thread(const char* name, int cpu) 2902static int __init pktgen_create_thread(const char* name, int cpu)
2904{ 2903{
2905 struct pktgen_thread *t = NULL; 2904 struct pktgen_thread *t = NULL;
2906 struct proc_dir_entry *pe; 2905 struct proc_dir_entry *pe;
diff --git a/net/core/utils.c b/net/core/utils.c
index 587eb7787deb..ac1d1fcf8673 100644
--- a/net/core/utils.c
+++ b/net/core/utils.c
@@ -162,7 +162,7 @@ EXPORT_SYMBOL(net_srandom);
162 * is otherwise not dependent on the TCP/IP stack. 162 * is otherwise not dependent on the TCP/IP stack.
163 */ 163 */
164 164
165__u32 in_aton(const char *str) 165__be32 in_aton(const char *str)
166{ 166{
167 unsigned long l; 167 unsigned long l;
168 unsigned int val; 168 unsigned int val;
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index 9f4dbeb59315..9890fd97e538 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -163,7 +163,7 @@ __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
163 skb_pull(skb,ETH_HLEN); 163 skb_pull(skb,ETH_HLEN);
164 eth = eth_hdr(skb); 164 eth = eth_hdr(skb);
165 165
166 if (*eth->h_dest&1) { 166 if (is_multicast_ether_addr(eth->h_dest)) {
167 if (!compare_ether_addr(eth->h_dest, dev->broadcast)) 167 if (!compare_ether_addr(eth->h_dest, dev->broadcast))
168 skb->pkt_type = PACKET_BROADCAST; 168 skb->pkt_type = PACKET_BROADCAST;
169 else 169 else
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index ce2b70ce4018..2a8adda15e11 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -383,7 +383,7 @@ out_nomem:
383 */ 383 */
384static inline struct ipq *ip_find(struct iphdr *iph, u32 user) 384static inline struct ipq *ip_find(struct iphdr *iph, u32 user)
385{ 385{
386 __u16 id = iph->id; 386 __be16 id = iph->id;
387 __u32 saddr = iph->saddr; 387 __u32 saddr = iph->saddr;
388 __u32 daddr = iph->daddr; 388 __u32 daddr = iph->daddr;
389 __u8 protocol = iph->protocol; 389 __u8 protocol = iph->protocol;
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 71da31818cfc..8b1c9bd0091e 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -418,7 +418,7 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*))
418 struct sk_buff *skb2; 418 struct sk_buff *skb2;
419 unsigned int mtu, hlen, left, len, ll_rs; 419 unsigned int mtu, hlen, left, len, ll_rs;
420 int offset; 420 int offset;
421 int not_last_frag; 421 __be16 not_last_frag;
422 struct rtable *rt = (struct rtable*)skb->dst; 422 struct rtable *rt = (struct rtable*)skb->dst;
423 int err = 0; 423 int err = 0;
424 424
@@ -1180,7 +1180,7 @@ int ip_push_pending_frames(struct sock *sk)
1180 struct ip_options *opt = NULL; 1180 struct ip_options *opt = NULL;
1181 struct rtable *rt = inet->cork.rt; 1181 struct rtable *rt = inet->cork.rt;
1182 struct iphdr *iph; 1182 struct iphdr *iph;
1183 int df = 0; 1183 __be16 df = 0;
1184 __u8 ttl; 1184 __u8 ttl;
1185 int err = 0; 1185 int err = 0;
1186 1186
diff --git a/net/ipv4/ipvs/ip_vs_xmit.c b/net/ipv4/ipvs/ip_vs_xmit.c
index 3b87482049cf..52c12e9edbbc 100644
--- a/net/ipv4/ipvs/ip_vs_xmit.c
+++ b/net/ipv4/ipvs/ip_vs_xmit.c
@@ -322,7 +322,7 @@ ip_vs_tunnel_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
322 struct net_device *tdev; /* Device to other host */ 322 struct net_device *tdev; /* Device to other host */
323 struct iphdr *old_iph = skb->nh.iph; 323 struct iphdr *old_iph = skb->nh.iph;
324 u8 tos = old_iph->tos; 324 u8 tos = old_iph->tos;
325 u16 df = old_iph->frag_off; 325 __be16 df = old_iph->frag_off;
326 struct iphdr *iph; /* Our new IP header */ 326 struct iphdr *iph; /* Our new IP header */
327 int max_headroom; /* The extra header space needed */ 327 int max_headroom; /* The extra header space needed */
328 int mtu; 328 int mtu;
diff --git a/net/ipv4/netfilter/ipt_helper.c b/net/ipv4/netfilter/ipt_helper.c
index bf14e1c7798a..aef649e393af 100644
--- a/net/ipv4/netfilter/ipt_helper.c
+++ b/net/ipv4/netfilter/ipt_helper.c
@@ -13,6 +13,7 @@
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/skbuff.h> 14#include <linux/skbuff.h>
15#include <linux/netfilter.h> 15#include <linux/netfilter.h>
16#include <linux/interrupt.h>
16#if defined(CONFIG_IP_NF_CONNTRACK) || defined(CONFIG_IP_NF_CONNTRACK_MODULE) 17#if defined(CONFIG_IP_NF_CONNTRACK) || defined(CONFIG_IP_NF_CONNTRACK_MODULE)
17#include <linux/netfilter_ipv4/ip_conntrack.h> 18#include <linux/netfilter_ipv4/ip_conntrack.h>
18#include <linux/netfilter_ipv4/ip_conntrack_core.h> 19#include <linux/netfilter_ipv4/ip_conntrack_core.h>
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index 16459c7f54b2..bfabaf9cba87 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -540,12 +540,7 @@ static struct sock *x25_make_new(struct sock *osk)
540 sk->sk_state = TCP_ESTABLISHED; 540 sk->sk_state = TCP_ESTABLISHED;
541 sk->sk_sleep = osk->sk_sleep; 541 sk->sk_sleep = osk->sk_sleep;
542 sk->sk_backlog_rcv = osk->sk_backlog_rcv; 542 sk->sk_backlog_rcv = osk->sk_backlog_rcv;
543 543 sock_copy_flags(sk, osk);
544 if (sock_flag(osk, SOCK_ZAPPED))
545 sock_set_flag(sk, SOCK_ZAPPED);
546
547 if (sock_flag(osk, SOCK_DBG))
548 sock_set_flag(sk, SOCK_DBG);
549 544
550 ox25 = x25_sk(osk); 545 ox25 = x25_sk(osk);
551 x25->t21 = ox25->t21; 546 x25->t21 = ox25->t21;
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 92e2b804c606..ac87a09ba83e 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -802,6 +802,7 @@ static int xfrm_add_policy(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfr
802 excl = nlh->nlmsg_type == XFRM_MSG_NEWPOLICY; 802 excl = nlh->nlmsg_type == XFRM_MSG_NEWPOLICY;
803 err = xfrm_policy_insert(p->dir, xp, excl); 803 err = xfrm_policy_insert(p->dir, xp, excl);
804 if (err) { 804 if (err) {
805 security_xfrm_policy_free(xp);
805 kfree(xp); 806 kfree(xp);
806 return err; 807 return err;
807 } 808 }