diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-11 12:10:19 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-11 12:10:19 -0400 |
| commit | ee54d2d87a8158d14434c1a3274bd7f713105836 (patch) | |
| tree | cd3e1f6fc0a7fc920e4153c01f35ff7bd92d79da /include/linux | |
| parent | bf61f8d357e5d71d74a3ca3be3cce52bf1a2c01a (diff) | |
| parent | da0dd231436ba7e81789e93dd933d7a275e1709d (diff) | |
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: (31 commits)
[NETFILTER]: xt_conntrack: add compat support
[NETFILTER]: iptable_raw: ignore short packets sent by SOCK_RAW sockets
[NETFILTER]: iptable_{filter,mangle}: more descriptive "happy cracking" message
[NETFILTER]: nf_nat: Clears helper private area when NATing
[NETFILTER]: ctnetlink: clear helper area and handle unchanged helper
[NETFILTER]: nf_conntrack: Removes unused destroy operation of l3proto
[NETFILTER]: nf_conntrack: Removes duplicated declarations
[NETFILTER]: nf_nat: remove unused argument of function allocating binding
[NETFILTER]: Clean up table initialization
[NET_SCHED]: Avoid requeue warning on dev_deactivate
[NET_SCHED]: Reread dev->qdisc for NETDEV_TX_OK
[NET_SCHED]: Rationalise return value of qdisc_restart
[NET]: Fix dev->qdisc race for NETDEV_TX_LOCKED case
[UDP]: Fix AF-specific references in AF-agnostic code.
[IrDA]: KingSun/DonShine USB IrDA dongle support.
[IPV6] ROUTE: Assign rt6i_idev for ip6_{prohibit,blk_hole}_entry.
[IPV6]: Do no rely on skb->dst before it is assigned.
[IPV6]: Send ICMPv6 error on scope violations.
[SCTP]: Do not include ABORT chunk header in the notification.
[SCTP]: Correctly copy addresses in sctp_copy_laddrs
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/netdevice.h | 2 | ||||
| -rw-r--r-- | include/linux/netfilter/x_tables.h | 8 | ||||
| -rw-r--r-- | include/linux/netfilter_arp/arp_tables.h | 41 | ||||
| -rw-r--r-- | include/linux/netfilter_ipv4/ip_tables.h | 22 | ||||
| -rw-r--r-- | include/linux/netfilter_ipv6/ip6_tables.h | 22 |
5 files changed, 95 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 30446222b3..f671cd2f13 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -467,6 +467,8 @@ struct net_device | |||
| 467 | /* device index hash chain */ | 467 | /* device index hash chain */ |
| 468 | struct hlist_node index_hlist; | 468 | struct hlist_node index_hlist; |
| 469 | 469 | ||
| 470 | struct net_device *link_watch_next; | ||
| 471 | |||
| 470 | /* register/unregister state machine */ | 472 | /* register/unregister state machine */ |
| 471 | enum { NETREG_UNINITIALIZED=0, | 473 | enum { NETREG_UNINITIALIZED=0, |
| 472 | NETREG_REGISTERED, /* completed register_netdevice */ | 474 | NETREG_REGISTERED, /* completed register_netdevice */ |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 022edfa97e..7e733a6ba4 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
| @@ -54,6 +54,14 @@ struct xt_entry_target | |||
| 54 | unsigned char data[0]; | 54 | unsigned char data[0]; |
| 55 | }; | 55 | }; |
| 56 | 56 | ||
| 57 | #define XT_TARGET_INIT(__name, __size) \ | ||
| 58 | { \ | ||
| 59 | .target.u.user = { \ | ||
| 60 | .target_size = XT_ALIGN(__size), \ | ||
| 61 | .name = __name, \ | ||
| 62 | }, \ | ||
| 63 | } | ||
| 64 | |||
| 57 | struct xt_standard_target | 65 | struct xt_standard_target |
| 58 | { | 66 | { |
| 59 | struct xt_entry_target target; | 67 | struct xt_entry_target target; |
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h index 24c8786d12..584cd1b18f 100644 --- a/include/linux/netfilter_arp/arp_tables.h +++ b/include/linux/netfilter_arp/arp_tables.h | |||
| @@ -238,6 +238,47 @@ static __inline__ struct arpt_entry_target *arpt_get_target(struct arpt_entry *e | |||
| 238 | */ | 238 | */ |
| 239 | #ifdef __KERNEL__ | 239 | #ifdef __KERNEL__ |
| 240 | 240 | ||
| 241 | /* Standard entry. */ | ||
| 242 | struct arpt_standard | ||
| 243 | { | ||
| 244 | struct arpt_entry entry; | ||
| 245 | struct arpt_standard_target target; | ||
| 246 | }; | ||
| 247 | |||
| 248 | struct arpt_error_target | ||
| 249 | { | ||
| 250 | struct arpt_entry_target target; | ||
| 251 | char errorname[ARPT_FUNCTION_MAXNAMELEN]; | ||
| 252 | }; | ||
| 253 | |||
| 254 | struct arpt_error | ||
| 255 | { | ||
| 256 | struct arpt_entry entry; | ||
| 257 | struct arpt_error_target target; | ||
| 258 | }; | ||
| 259 | |||
| 260 | #define ARPT_ENTRY_INIT(__size) \ | ||
| 261 | { \ | ||
| 262 | .target_offset = sizeof(struct arpt_entry), \ | ||
| 263 | .next_offset = (__size), \ | ||
| 264 | } | ||
| 265 | |||
| 266 | #define ARPT_STANDARD_INIT(__verdict) \ | ||
| 267 | { \ | ||
| 268 | .entry = ARPT_ENTRY_INIT(sizeof(struct arpt_standard)), \ | ||
| 269 | .target = XT_TARGET_INIT(ARPT_STANDARD_TARGET, \ | ||
| 270 | sizeof(struct arpt_standard_target)), \ | ||
| 271 | .target.verdict = -(__verdict) - 1, \ | ||
| 272 | } | ||
| 273 | |||
| 274 | #define ARPT_ERROR_INIT \ | ||
| 275 | { \ | ||
| 276 | .entry = ARPT_ENTRY_INIT(sizeof(struct arpt_error)), \ | ||
| 277 | .target = XT_TARGET_INIT(ARPT_ERROR_TARGET, \ | ||
| 278 | sizeof(struct arpt_error_target)), \ | ||
| 279 | .target.errorname = "ERROR", \ | ||
| 280 | } | ||
| 281 | |||
| 241 | #define arpt_register_target(tgt) \ | 282 | #define arpt_register_target(tgt) \ |
| 242 | ({ (tgt)->family = NF_ARP; \ | 283 | ({ (tgt)->family = NF_ARP; \ |
| 243 | xt_register_target(tgt); }) | 284 | xt_register_target(tgt); }) |
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index 9527296595..2f46dd728e 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h | |||
| @@ -295,6 +295,28 @@ struct ipt_error | |||
| 295 | struct ipt_error_target target; | 295 | struct ipt_error_target target; |
| 296 | }; | 296 | }; |
| 297 | 297 | ||
| 298 | #define IPT_ENTRY_INIT(__size) \ | ||
| 299 | { \ | ||
| 300 | .target_offset = sizeof(struct ipt_entry), \ | ||
| 301 | .next_offset = (__size), \ | ||
| 302 | } | ||
| 303 | |||
| 304 | #define IPT_STANDARD_INIT(__verdict) \ | ||
| 305 | { \ | ||
| 306 | .entry = IPT_ENTRY_INIT(sizeof(struct ipt_standard)), \ | ||
| 307 | .target = XT_TARGET_INIT(IPT_STANDARD_TARGET, \ | ||
| 308 | sizeof(struct xt_standard_target)), \ | ||
| 309 | .target.verdict = -(__verdict) - 1, \ | ||
| 310 | } | ||
| 311 | |||
| 312 | #define IPT_ERROR_INIT \ | ||
| 313 | { \ | ||
| 314 | .entry = IPT_ENTRY_INIT(sizeof(struct ipt_error)), \ | ||
| 315 | .target = XT_TARGET_INIT(IPT_ERROR_TARGET, \ | ||
| 316 | sizeof(struct ipt_error_target)), \ | ||
| 317 | .target.errorname = "ERROR", \ | ||
| 318 | } | ||
| 319 | |||
| 298 | extern unsigned int ipt_do_table(struct sk_buff **pskb, | 320 | extern unsigned int ipt_do_table(struct sk_buff **pskb, |
| 299 | unsigned int hook, | 321 | unsigned int hook, |
| 300 | const struct net_device *in, | 322 | const struct net_device *in, |
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index 61aa10412f..4686f8342c 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
| @@ -123,6 +123,28 @@ struct ip6t_error | |||
| 123 | struct ip6t_error_target target; | 123 | struct ip6t_error_target target; |
| 124 | }; | 124 | }; |
| 125 | 125 | ||
| 126 | #define IP6T_ENTRY_INIT(__size) \ | ||
| 127 | { \ | ||
| 128 | .target_offset = sizeof(struct ip6t_entry), \ | ||
| 129 | .next_offset = (__size), \ | ||
| 130 | } | ||
| 131 | |||
| 132 | #define IP6T_STANDARD_INIT(__verdict) \ | ||
| 133 | { \ | ||
| 134 | .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_standard)), \ | ||
| 135 | .target = XT_TARGET_INIT(IP6T_STANDARD_TARGET, \ | ||
| 136 | sizeof(struct ip6t_standard_target)), \ | ||
| 137 | .target.verdict = -(__verdict) - 1, \ | ||
| 138 | } | ||
| 139 | |||
| 140 | #define IP6T_ERROR_INIT \ | ||
| 141 | { \ | ||
| 142 | .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_error)), \ | ||
| 143 | .target = XT_TARGET_INIT(IP6T_ERROR_TARGET, \ | ||
| 144 | sizeof(struct ip6t_error_target)), \ | ||
| 145 | .target.errorname = "ERROR", \ | ||
| 146 | } | ||
| 147 | |||
| 126 | /* | 148 | /* |
| 127 | * New IP firewall options for [gs]etsockopt at the RAW IP level. | 149 | * New IP firewall options for [gs]etsockopt at the RAW IP level. |
| 128 | * Unlike BSD Linux inherits IP options so you don't have to use | 150 | * Unlike BSD Linux inherits IP options so you don't have to use |
