/[linux-patches]/genpatches-2.6/trunk/2.6.14/1160_5_ctnetlink-attribute-size.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.14/1160_5_ctnetlink-attribute-size.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 235 - (hide annotations) (download) (as text)
Thu Dec 29 16:17:24 2005 UTC (14 years, 11 months ago) by dsd
Original Path: genpatches-2.6/trunk/2.6.14/1060_5_ctnetlink-attribute-size.patch
File MIME type: text/x-diff
File size: 1257 byte(s)
2.6.14.5 thanks to kerframil
1 dsd 235 From: Krzysztof Oledzki <olenf@ans.pl>
2     Date: Tue, 13 Dec 2005 09:56:08 +0000 (+0100)
3     Subject: [PATCH] Fix CTA_PROTO_NUM attribute size in ctnetlink
4     X-Git-Url: http://kernel.org/git/?p=linux/kernel/git/gregkh/linux-2.6.14.y.git;a=commitdiff;h=1e7d00170b9215692eee2628c2a7d6af86cabfa7
5    
6     [PATCH] Fix CTA_PROTO_NUM attribute size in ctnetlink
7    
8     CTA_PROTO_NUM is a u_int8_t.
9    
10     Based on oryginal patch by Patrick McHardy <kaber@trash.net>
11    
12     Signed-off-by: Krzysztof Piotr Oledzki <ole@ans.pl>
13     Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14     ---
15    
16     --- a/net/ipv4/netfilter/ip_conntrack_netlink.c
17     +++ b/net/ipv4/netfilter/ip_conntrack_netlink.c
18     @@ -506,7 +506,7 @@ nfattr_failure:
19     }
20    
21     static const int cta_min_proto[CTA_PROTO_MAX] = {
22     - [CTA_PROTO_NUM-1] = sizeof(u_int16_t),
23     + [CTA_PROTO_NUM-1] = sizeof(u_int8_t),
24     [CTA_PROTO_SRC_PORT-1] = sizeof(u_int16_t),
25     [CTA_PROTO_DST_PORT-1] = sizeof(u_int16_t),
26     [CTA_PROTO_ICMP_TYPE-1] = sizeof(u_int8_t),
27     @@ -532,7 +532,7 @@ ctnetlink_parse_tuple_proto(struct nfatt
28    
29     if (!tb[CTA_PROTO_NUM-1])
30     return -EINVAL;
31     - tuple->dst.protonum = *(u_int16_t *)NFA_DATA(tb[CTA_PROTO_NUM-1]);
32     + tuple->dst.protonum = *(u_int8_t *)NFA_DATA(tb[CTA_PROTO_NUM-1]);
33    
34     proto = ip_conntrack_proto_find_get(tuple->dst.protonum);
35    

  ViewVC Help
Powered by ViewVC 1.1.20