diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-23 22:43:49 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-23 22:43:49 -0700 |
commit | aab66c401b583d39dc05dd1d6e9cab50e8df92dd (patch) | |
tree | e1c62010931cba5fbe99afd7e57c49f87f3cf29d /security | |
parent | 1332bcc37557a97407889b09777d50a887804c38 (diff) | |
parent | f533ba4bb605195dca5ca1b312dc834e25fd4dc5 (diff) | |
download | history-aab66c401b583d39dc05dd1d6e9cab50e8df92dd.tar.gz |
Merge bk://kernel.bkbits.net/davem/net-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
Diffstat (limited to 'security')
-rw-r--r-- | security/selinux/hooks.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 6e35a273351816..3dbd39c5a1db75 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -2796,7 +2796,7 @@ static void selinux_task_to_inode(struct task_struct *p, /* Returns error only if unable to parse addresses */ static int selinux_parse_skb_ipv4(struct sk_buff *skb, struct avc_audit_data *ad) { - int offset, ihlen, ret; + int offset, ihlen, ret = -EINVAL; struct iphdr _iph, *ih; offset = skb->nh.raw - skb->data; @@ -2810,6 +2810,7 @@ static int selinux_parse_skb_ipv4(struct sk_buff *skb, struct avc_audit_data *ad ad->u.net.v4info.saddr = ih->saddr; ad->u.net.v4info.daddr = ih->daddr; + ret = 0; switch (ih->protocol) { case IPPROTO_TCP: { @@ -2857,7 +2858,7 @@ out: static int selinux_parse_skb_ipv6(struct sk_buff *skb, struct avc_audit_data *ad) { u8 nexthdr; - int ret, offset; + int ret = -EINVAL, offset; struct ipv6hdr _ipv6h, *ip6; offset = skb->nh.raw - skb->data; @@ -2867,6 +2868,7 @@ static int selinux_parse_skb_ipv6(struct sk_buff *skb, struct avc_audit_data *ad ipv6_addr_copy(&ad->u.net.v6info.saddr, &ip6->saddr); ipv6_addr_copy(&ad->u.net.v6info.daddr, &ip6->daddr); + ret = 0; nexthdr = ip6->nexthdr; offset += sizeof(_ipv6h); |