diff options
| -rw-r--r-- | drivers/atm/Makefile | 2 | ||||
| -rw-r--r-- | include/linux/dio.h | 2 | ||||
| -rw-r--r-- | include/net/sctp/sctp.h | 6 | ||||
| -rw-r--r-- | net/8021q/vlan.c | 9 | ||||
| -rw-r--r-- | net/atm/mpc.c | 7 | ||||
| -rw-r--r-- | net/decnet/dn_neigh.c | 1 | ||||
| -rw-r--r-- | net/ipv4/netfilter/ipt_REJECT.c | 40 | ||||
| -rw-r--r-- | net/xfrm/xfrm_policy.c | 1 |
8 files changed, 54 insertions, 14 deletions
diff --git a/drivers/atm/Makefile b/drivers/atm/Makefile index 907c5933a30c..d1dcd8eae3c9 100644 --- a/drivers/atm/Makefile +++ b/drivers/atm/Makefile @@ -68,4 +68,4 @@ $(obj)/fore200e_sba_fw.c: $(patsubst "%", %, $(CONFIG_ATM_FORE200E_SBA_FW)) \ # deal with the various suffixes of the binary firmware images $(obj)/%.bin $(obj)/%.bin1 $(obj)/%.bin2: $(src)/%.data objcopy -Iihex $< -Obinary $@.gz - gzip -df $@.gz + gzip -n -df $@.gz diff --git a/include/linux/dio.h b/include/linux/dio.h index d42c86b9608d..fae9395fcf4f 100644 --- a/include/linux/dio.h +++ b/include/linux/dio.h @@ -254,7 +254,7 @@ static inline struct dio_driver *dio_dev_driver(const struct dio_dev *d) #define dio_resource_start(d) ((d)->resource.start) #define dio_resource_end(d) ((d)->resource.end) -#define dio_resource_len(d) ((d)->resource.end-(z)->resource.start+1) +#define dio_resource_len(d) ((d)->resource.end-(d)->resource.start+1) #define dio_resource_flags(d) ((d)->resource.flags) #define dio_request_device(d, name) \ diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index ac856c13d354..208c6aea06a1 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h @@ -607,14 +607,14 @@ struct sctp6_sock { /* Is a socket of this style? */ #define sctp_style(sk, style) __sctp_style((sk), (SCTP_SOCKET_##style)) -int static inline __sctp_style(const struct sock *sk, sctp_socket_type_t style) +static inline int __sctp_style(const struct sock *sk, sctp_socket_type_t style) { return sctp_sk(sk)->type == style; } /* Is the association in this state? */ #define sctp_state(asoc, state) __sctp_state((asoc), (SCTP_STATE_##state)) -int static inline __sctp_state(const struct sctp_association *asoc, +static inline int __sctp_state(const struct sctp_association *asoc, sctp_state_t state) { return asoc->state == state; @@ -622,7 +622,7 @@ int static inline __sctp_state(const struct sctp_association *asoc, /* Is the socket in this state? */ #define sctp_sstate(sk, state) __sctp_sstate((sk), (SCTP_SS_##state)) -int static inline __sctp_sstate(const struct sock *sk, sctp_sock_state_t state) +static inline int __sctp_sstate(const struct sock *sk, sctp_sock_state_t state) { return sk->sk_state == state; } diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 94124bb04852..87b211585e91 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -96,13 +96,18 @@ static int __init vlan_proto_init(void) printk(KERN_ERR "%s %s: can't create entry in proc filesystem!\n", __FUNCTION__, VLAN_NAME); - return 1; + return err; } dev_add_pack(&vlan_packet_type); /* Register us to receive netdevice events */ - register_netdevice_notifier(&vlan_notifier_block); + err = register_netdevice_notifier(&vlan_notifier_block); + if (err < 0) { + dev_remove_pack(&vlan_packet_type); + vlan_proc_cleanup(); + return err; + } vlan_ioctl_set(vlan_ioctl_handler); diff --git a/net/atm/mpc.c b/net/atm/mpc.c index e93df67eba1b..a28db2d2d0c0 100644 --- a/net/atm/mpc.c +++ b/net/atm/mpc.c @@ -755,13 +755,18 @@ int atm_mpoa_mpoad_attach (struct atm_vcc *vcc, int arg) { struct mpoa_client *mpc; struct lec_priv *priv; + int err; if (mpcs == NULL) { init_timer(&mpc_timer); mpc_timer_refresh(); /* This lets us now how our LECs are doing */ - register_netdevice_notifier(&mpoa_notifier); + err = register_netdevice_notifier(&mpoa_notifier); + if (err < 0) { + del_timer(&mpc_timer); + return err; + } } mpc = find_mpc_by_itfnum(arg); diff --git a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c index dc48de88b9b3..6128a02610c4 100644 --- a/net/decnet/dn_neigh.c +++ b/net/decnet/dn_neigh.c @@ -26,6 +26,7 @@ #include <linux/config.h> #include <linux/net.h> +#include <linux/module.h> #include <linux/socket.h> #include <linux/if_arp.h> #include <linux/if_ether.h> diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c index 811aec6f67d8..d0a5e05f8652 100644 --- a/net/ipv4/netfilter/ipt_REJECT.c +++ b/net/ipv4/netfilter/ipt_REJECT.c @@ -22,6 +22,7 @@ #include <net/ip.h> #include <net/tcp.h> #include <net/route.h> +#include <net/dst.h> #include <linux/netfilter_ipv4/ip_tables.h> #include <linux/netfilter_ipv4/ipt_REJECT.h> #ifdef CONFIG_BRIDGE_NETFILTER @@ -38,7 +39,8 @@ MODULE_DESCRIPTION("iptables REJECT target module"); #define DEBUGP(format, args...) #endif -static inline struct rtable *route_reverse(struct sk_buff *skb, int hook) +static inline struct rtable *route_reverse(struct sk_buff *skb, + struct tcphdr *tcph, int hook) { struct iphdr *iph = skb->nh.iph; struct dst_entry *odst; @@ -75,10 +77,23 @@ static inline struct rtable *route_reverse(struct sk_buff *skb, int hook) dst_release(&rt->u.dst); rt = (struct rtable *)skb->dst; skb->dst = odst; + + fl.nl_u.ip4_u.daddr = iph->saddr; + fl.nl_u.ip4_u.saddr = iph->daddr; + fl.nl_u.ip4_u.tos = RT_TOS(iph->tos); } if (rt->u.dst.error) { dst_release(&rt->u.dst); + return NULL; + } + + fl.proto = IPPROTO_TCP; + fl.fl_ip_sport = tcph->dest; + fl.fl_ip_dport = tcph->source; + + if (xfrm_lookup((struct dst_entry **)&rt, &fl, NULL, 0)) { + dst_release(&rt->u.dst); rt = NULL; } @@ -110,7 +125,7 @@ static void send_reset(struct sk_buff *oldskb, int hook) return; /* FIXME: Check checksum --RR */ - if ((rt = route_reverse(oldskb, hook)) == NULL) + if ((rt = route_reverse(oldskb, oth, hook)) == NULL) return; hh_len = LL_RESERVED_SPACE(rt->u.dst.dev); @@ -282,10 +297,23 @@ static void send_unreach(struct sk_buff *skb_in, int code) tos = (iph->tos & IPTOS_TOS_MASK) | IPTOS_PREC_INTERNETCONTROL; { - struct flowi fl = { .nl_u = { .ip4_u = - { .daddr = skb_in->nh.iph->saddr, - .saddr = saddr, - .tos = RT_TOS(tos) } } }; + struct flowi fl = { + .nl_u = { + .ip4_u = { + .daddr = skb_in->nh.iph->saddr, + .saddr = saddr, + .tos = RT_TOS(tos) + } + }, + .proto = IPPROTO_ICMP, + .uli_u = { + .icmpt = { + .type = ICMP_DEST_UNREACH, + .code = code + } + } + }; + if (ip_route_output_key(&rt, &fl)) return; } diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index cb525d845a96..0bc92ef6f851 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -353,6 +353,7 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl) newpos = p; if (delpol) break; + p = &pol->next; } if (newpos) p = newpos; |
