Commit 7d620a4e authored by Linus Torvalds's avatar Linus Torvalds

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:
  [IPV4]: Fix single-entry /proc/net/fib_trie output.
  [SELINUX]: Fix 2.6.20-rc6 build when no xfrm
parents 86d43258 095b8501
...@@ -2290,16 +2290,17 @@ static int fib_trie_seq_show(struct seq_file *seq, void *v) ...@@ -2290,16 +2290,17 @@ static int fib_trie_seq_show(struct seq_file *seq, void *v)
if (v == SEQ_START_TOKEN) if (v == SEQ_START_TOKEN)
return 0; return 0;
if (!NODE_PARENT(n)) {
if (iter->trie == trie_local)
seq_puts(seq, "<local>:\n");
else
seq_puts(seq, "<main>:\n");
}
if (IS_TNODE(n)) { if (IS_TNODE(n)) {
struct tnode *tn = (struct tnode *) n; struct tnode *tn = (struct tnode *) n;
__be32 prf = htonl(MASK_PFX(tn->key, tn->pos)); __be32 prf = htonl(MASK_PFX(tn->key, tn->pos));
if (!NODE_PARENT(n)) {
if (iter->trie == trie_local)
seq_puts(seq, "<local>:\n");
else
seq_puts(seq, "<main>:\n");
}
seq_indent(seq, iter->depth-1); seq_indent(seq, iter->depth-1);
seq_printf(seq, " +-- %d.%d.%d.%d/%d %d %d %d\n", seq_printf(seq, " +-- %d.%d.%d.%d/%d %d %d %d\n",
NIPQUAD(prf), tn->pos, tn->bits, tn->full_children, NIPQUAD(prf), tn->pos, tn->bits, tn->full_children,
......
...@@ -37,6 +37,11 @@ int selinux_xfrm_sock_rcv_skb(u32 sid, struct sk_buff *skb, ...@@ -37,6 +37,11 @@ int selinux_xfrm_sock_rcv_skb(u32 sid, struct sk_buff *skb,
int selinux_xfrm_postroute_last(u32 isec_sid, struct sk_buff *skb, int selinux_xfrm_postroute_last(u32 isec_sid, struct sk_buff *skb,
struct avc_audit_data *ad, u8 proto); struct avc_audit_data *ad, u8 proto);
int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *sid, int ckall); int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *sid, int ckall);
static inline void selinux_xfrm_notify_policyload(void)
{
atomic_inc(&flow_cache_genid);
}
#else #else
static inline int selinux_xfrm_sock_rcv_skb(u32 isec_sid, struct sk_buff *skb, static inline int selinux_xfrm_sock_rcv_skb(u32 isec_sid, struct sk_buff *skb,
struct avc_audit_data *ad) struct avc_audit_data *ad)
...@@ -55,6 +60,10 @@ static inline int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *sid, int ...@@ -55,6 +60,10 @@ static inline int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *sid, int
*sid = SECSID_NULL; *sid = SECSID_NULL;
return 0; return 0;
} }
static inline void selinux_xfrm_notify_policyload(void)
{
}
#endif #endif
static inline void selinux_skb_xfrm_sid(struct sk_buff *skb, u32 *sid) static inline void selinux_skb_xfrm_sid(struct sk_buff *skb, u32 *sid)
......
...@@ -1299,7 +1299,7 @@ int security_load_policy(void *data, size_t len) ...@@ -1299,7 +1299,7 @@ int security_load_policy(void *data, size_t len)
avc_ss_reset(seqno); avc_ss_reset(seqno);
selnl_notify_policyload(seqno); selnl_notify_policyload(seqno);
selinux_netlbl_cache_invalidate(); selinux_netlbl_cache_invalidate();
atomic_inc(&flow_cache_genid); selinux_xfrm_notify_policyload();
return 0; return 0;
} }
...@@ -1355,7 +1355,7 @@ int security_load_policy(void *data, size_t len) ...@@ -1355,7 +1355,7 @@ int security_load_policy(void *data, size_t len)
avc_ss_reset(seqno); avc_ss_reset(seqno);
selnl_notify_policyload(seqno); selnl_notify_policyload(seqno);
selinux_netlbl_cache_invalidate(); selinux_netlbl_cache_invalidate();
atomic_inc(&flow_cache_genid); selinux_xfrm_notify_policyload();
return 0; return 0;
...@@ -1855,7 +1855,7 @@ out: ...@@ -1855,7 +1855,7 @@ out:
if (!rc) { if (!rc) {
avc_ss_reset(seqno); avc_ss_reset(seqno);
selnl_notify_policyload(seqno); selnl_notify_policyload(seqno);
atomic_inc(&flow_cache_genid); selinux_xfrm_notify_policyload();
} }
return rc; return rc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment