diff options
-rw-r--r-- | include/linux/filter.h | 2 | ||||
-rw-r--r-- | include/linux/inet.h | 2 | ||||
-rw-r--r-- | include/linux/ip.h | 10 | ||||
-rw-r--r-- | include/net/sock.h | 4 | ||||
-rw-r--r-- | net/atm/br2684.c | 2 | ||||
-rw-r--r-- | net/bridge/br_input.c | 2 | ||||
-rw-r--r-- | net/bridge/br_netfilter.c | 13 | ||||
-rw-r--r-- | net/core/filter.c | 6 | ||||
-rw-r--r-- | net/core/pktgen.c | 5 | ||||
-rw-r--r-- | net/core/utils.c | 2 | ||||
-rw-r--r-- | net/ethernet/eth.c | 2 | ||||
-rw-r--r-- | net/ipv4/ip_fragment.c | 2 | ||||
-rw-r--r-- | net/ipv4/ip_output.c | 4 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_xmit.c | 2 | ||||
-rw-r--r-- | net/ipv4/netfilter/ipt_helper.c | 1 | ||||
-rw-r--r-- | net/x25/af_x25.c | 7 | ||||
-rw-r--r-- | net/xfrm/xfrm_user.c | 1 | ||||
-rw-r--r-- | security/selinux/include/av_perm_to_string.h | 3 | ||||
-rw-r--r-- | security/selinux/include/av_permissions.h | 3 | ||||
-rw-r--r-- | security/selinux/xfrm.c | 8 |
20 files changed, 37 insertions, 44 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h index 3ba843c46382..c6cb8f095088 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
@@ -143,7 +143,7 @@ static inline unsigned int sk_filter_len(struct sk_filter *fp) | |||
143 | struct sk_buff; | 143 | struct sk_buff; |
144 | struct sock; | 144 | struct sock; |
145 | 145 | ||
146 | extern int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen); | 146 | extern unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen); |
147 | extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); | 147 | extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); |
148 | extern int sk_chk_filter(struct sock_filter *filter, int flen); | 148 | extern int sk_chk_filter(struct sock_filter *filter, int flen); |
149 | #endif /* __KERNEL__ */ | 149 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/inet.h b/include/linux/inet.h index 3b5e9fdff872..6c5587af118d 100644 --- a/include/linux/inet.h +++ b/include/linux/inet.h | |||
@@ -45,6 +45,6 @@ | |||
45 | #ifdef __KERNEL__ | 45 | #ifdef __KERNEL__ |
46 | #include <linux/types.h> | 46 | #include <linux/types.h> |
47 | 47 | ||
48 | extern __u32 in_aton(const char *str); | 48 | extern __be32 in_aton(const char *str); |
49 | #endif | 49 | #endif |
50 | #endif /* _LINUX_INET_H */ | 50 | #endif /* _LINUX_INET_H */ |
diff --git a/include/linux/ip.h b/include/linux/ip.h index 9e2eb9a602eb..4b55cf1df732 100644 --- a/include/linux/ip.h +++ b/include/linux/ip.h | |||
@@ -90,14 +90,14 @@ struct iphdr { | |||
90 | #error "Please fix <asm/byteorder.h>" | 90 | #error "Please fix <asm/byteorder.h>" |
91 | #endif | 91 | #endif |
92 | __u8 tos; | 92 | __u8 tos; |
93 | __u16 tot_len; | 93 | __be16 tot_len; |
94 | __u16 id; | 94 | __be16 id; |
95 | __u16 frag_off; | 95 | __be16 frag_off; |
96 | __u8 ttl; | 96 | __u8 ttl; |
97 | __u8 protocol; | 97 | __u8 protocol; |
98 | __u16 check; | 98 | __u16 check; |
99 | __u32 saddr; | 99 | __be32 saddr; |
100 | __u32 daddr; | 100 | __be32 daddr; |
101 | /*The options start here. */ | 101 | /*The options start here. */ |
102 | }; | 102 | }; |
103 | 103 | ||
diff --git a/include/net/sock.h b/include/net/sock.h index 6961700ff3a0..1806e5b61419 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -856,8 +856,8 @@ static inline int sk_filter(struct sock *sk, struct sk_buff *skb, int needlock) | |||
856 | 856 | ||
857 | filter = sk->sk_filter; | 857 | filter = sk->sk_filter; |
858 | if (filter) { | 858 | if (filter) { |
859 | int pkt_len = sk_run_filter(skb, filter->insns, | 859 | unsigned int pkt_len = sk_run_filter(skb, filter->insns, |
860 | filter->len); | 860 | filter->len); |
861 | if (!pkt_len) | 861 | if (!pkt_len) |
862 | err = -EPERM; | 862 | err = -EPERM; |
863 | else | 863 | else |
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. */ |
396 | static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff **pskb, | 396 | static 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 | ||
78 | int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen) | 78 | unsigned 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 | ||
474 | static int pktgen_remove_device(struct pktgen_thread* t, struct pktgen_dev *i); | 474 | static int pktgen_remove_device(struct pktgen_thread* t, struct pktgen_dev *i); |
475 | static int pktgen_add_device(struct pktgen_thread* t, const char* ifname); | 475 | static int pktgen_add_device(struct pktgen_thread* t, const char* ifname); |
476 | static struct pktgen_thread* pktgen_find_thread(const char* name); | ||
477 | static struct pktgen_dev *pktgen_find_dev(struct pktgen_thread* t, const char* ifname); | 476 | static struct pktgen_dev *pktgen_find_dev(struct pktgen_thread* t, const char* ifname); |
478 | static int pktgen_device_event(struct notifier_block *, unsigned long, void *); | 477 | static int pktgen_device_event(struct notifier_block *, unsigned long, void *); |
479 | static void pktgen_run_all_threads(void); | 478 | static 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 | ||
2886 | static struct pktgen_thread *pktgen_find_thread(const char* name) | 2885 | static 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 | ||
2903 | static int pktgen_create_thread(const char* name, int cpu) | 2902 | static 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 | */ |
384 | static inline struct ipq *ip_find(struct iphdr *iph, u32 user) | 384 | static 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 | } |
diff --git a/security/selinux/include/av_perm_to_string.h b/security/selinux/include/av_perm_to_string.h index 71aeb12f07c8..591e98d9315a 100644 --- a/security/selinux/include/av_perm_to_string.h +++ b/security/selinux/include/av_perm_to_string.h | |||
@@ -238,5 +238,4 @@ | |||
238 | S_(SECCLASS_NSCD, NSCD__SHMEMHOST, "shmemhost") | 238 | S_(SECCLASS_NSCD, NSCD__SHMEMHOST, "shmemhost") |
239 | S_(SECCLASS_ASSOCIATION, ASSOCIATION__SENDTO, "sendto") | 239 | S_(SECCLASS_ASSOCIATION, ASSOCIATION__SENDTO, "sendto") |
240 | S_(SECCLASS_ASSOCIATION, ASSOCIATION__RECVFROM, "recvfrom") | 240 | S_(SECCLASS_ASSOCIATION, ASSOCIATION__RECVFROM, "recvfrom") |
241 | S_(SECCLASS_ASSOCIATION, ASSOCIATION__RELABELFROM, "relabelfrom") | 241 | S_(SECCLASS_ASSOCIATION, ASSOCIATION__SETCONTEXT, "setcontext") |
242 | S_(SECCLASS_ASSOCIATION, ASSOCIATION__RELABELTO, "relabelto") | ||
diff --git a/security/selinux/include/av_permissions.h b/security/selinux/include/av_permissions.h index d1d0996049e3..d7f02edf3930 100644 --- a/security/selinux/include/av_permissions.h +++ b/security/selinux/include/av_permissions.h | |||
@@ -908,8 +908,7 @@ | |||
908 | 908 | ||
909 | #define ASSOCIATION__SENDTO 0x00000001UL | 909 | #define ASSOCIATION__SENDTO 0x00000001UL |
910 | #define ASSOCIATION__RECVFROM 0x00000002UL | 910 | #define ASSOCIATION__RECVFROM 0x00000002UL |
911 | #define ASSOCIATION__RELABELFROM 0x00000004UL | 911 | #define ASSOCIATION__SETCONTEXT 0x00000004UL |
912 | #define ASSOCIATION__RELABELTO 0x00000008UL | ||
913 | 912 | ||
914 | #define NETLINK_KOBJECT_UEVENT_SOCKET__IOCTL 0x00000001UL | 913 | #define NETLINK_KOBJECT_UEVENT_SOCKET__IOCTL 0x00000001UL |
915 | #define NETLINK_KOBJECT_UEVENT_SOCKET__READ 0x00000002UL | 914 | #define NETLINK_KOBJECT_UEVENT_SOCKET__READ 0x00000002UL |
diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c index c4d87d4dca7b..5b7776504e4c 100644 --- a/security/selinux/xfrm.c +++ b/security/selinux/xfrm.c | |||
@@ -137,15 +137,9 @@ static int selinux_xfrm_sec_ctx_alloc(struct xfrm_sec_ctx **ctxp, struct xfrm_us | |||
137 | * Must be permitted to relabel from default socket type (process type) | 137 | * Must be permitted to relabel from default socket type (process type) |
138 | * to specified context | 138 | * to specified context |
139 | */ | 139 | */ |
140 | rc = avc_has_perm(tsec->sid, tsec->sid, | ||
141 | SECCLASS_ASSOCIATION, | ||
142 | ASSOCIATION__RELABELFROM, NULL); | ||
143 | if (rc) | ||
144 | goto out; | ||
145 | |||
146 | rc = avc_has_perm(tsec->sid, ctx->ctx_sid, | 140 | rc = avc_has_perm(tsec->sid, ctx->ctx_sid, |
147 | SECCLASS_ASSOCIATION, | 141 | SECCLASS_ASSOCIATION, |
148 | ASSOCIATION__RELABELTO, NULL); | 142 | ASSOCIATION__SETCONTEXT, NULL); |
149 | if (rc) | 143 | if (rc) |
150 | goto out; | 144 | goto out; |
151 | 145 | ||