diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-29 00:24:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-29 00:24:32 -0400 |
commit | a839688362e32f01608838516036697e30618b39 (patch) | |
tree | a174d93d568ba9735b13bb6ebb5f1a36c8f56308 /net | |
parent | 2fa938b8a3964c21b23d9d095091e7abc88249c5 (diff) | |
parent | 12dc2fdd3e6067f5137e4a6d8af0b1a994952f52 (diff) |
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net')
-rw-r--r-- | net/bridge/br_netfilter.c | 2 | ||||
-rw-r--r-- | net/bridge/netfilter/ebt_log.c | 6 | ||||
-rw-r--r-- | net/core/neighbour.c | 6 | ||||
-rw-r--r-- | net/core/rtnetlink.c | 2 | ||||
-rw-r--r-- | net/core/wireless.c | 1 | ||||
-rw-r--r-- | net/ethernet/eth.c | 7 | ||||
-rw-r--r-- | net/ipv4/fib_trie.c | 56 | ||||
-rw-r--r-- | net/ipv4/ip_input.c | 6 | ||||
-rw-r--r-- | net/ipv4/ip_output.c | 8 | ||||
-rw-r--r-- | net/ipv4/ipconfig.c | 4 | ||||
-rw-r--r-- | net/ipv4/ipmr.c | 10 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_conn.c | 25 | ||||
-rw-r--r-- | net/ipv4/netfilter/ipt_CLUSTERIP.c | 7 | ||||
-rw-r--r-- | net/ipv4/route.c | 9 | ||||
-rw-r--r-- | net/ipv6/addrconf.c | 19 | ||||
-rw-r--r-- | net/ipv6/ip6_flowlabel.c | 1 | ||||
-rw-r--r-- | net/sched/act_api.c | 10 | ||||
-rw-r--r-- | net/sched/cls_api.c | 2 | ||||
-rw-r--r-- | net/sched/cls_rsvp.h | 1 | ||||
-rw-r--r-- | net/sched/sch_api.c | 2 | ||||
-rw-r--r-- | net/sched/sch_cbq.c | 3 | ||||
-rw-r--r-- | net/sctp/endpointola.c | 13 | ||||
-rw-r--r-- | net/sctp/protocol.c | 5 | ||||
-rw-r--r-- | net/sctp/sysctl.c | 13 | ||||
-rw-r--r-- | net/sctp/transport.c | 1 |
25 files changed, 136 insertions, 83 deletions
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index 03ae4edddac3..2d52fee63a8c 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c | |||
@@ -844,7 +844,7 @@ static unsigned int ip_sabotage_out(unsigned int hook, struct sk_buff **pskb, | |||
844 | * doesn't use the bridge parent of the indev by using | 844 | * doesn't use the bridge parent of the indev by using |
845 | * the BRNF_DONT_TAKE_PARENT mask. */ | 845 | * the BRNF_DONT_TAKE_PARENT mask. */ |
846 | if (hook == NF_IP_FORWARD && nf_bridge->physindev == NULL) { | 846 | if (hook == NF_IP_FORWARD && nf_bridge->physindev == NULL) { |
847 | nf_bridge->mask &= BRNF_DONT_TAKE_PARENT; | 847 | nf_bridge->mask |= BRNF_DONT_TAKE_PARENT; |
848 | nf_bridge->physindev = (struct net_device *)in; | 848 | nf_bridge->physindev = (struct net_device *)in; |
849 | } | 849 | } |
850 | #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) | 850 | #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) |
diff --git a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c index e4ae34b88925..662975be3d1d 100644 --- a/net/bridge/netfilter/ebt_log.c +++ b/net/bridge/netfilter/ebt_log.c | |||
@@ -61,8 +61,6 @@ static void ebt_log(const struct sk_buff *skb, unsigned int hooknr, | |||
61 | { | 61 | { |
62 | struct ebt_log_info *info = (struct ebt_log_info *)data; | 62 | struct ebt_log_info *info = (struct ebt_log_info *)data; |
63 | char level_string[4] = "< >"; | 63 | char level_string[4] = "< >"; |
64 | union {struct iphdr iph; struct tcpudphdr ports; | ||
65 | struct arphdr arph; struct arppayload arpp;} u; | ||
66 | 64 | ||
67 | level_string[1] = '0' + info->loglevel; | 65 | level_string[1] = '0' + info->loglevel; |
68 | spin_lock_bh(&ebt_log_lock); | 66 | spin_lock_bh(&ebt_log_lock); |
@@ -88,7 +86,7 @@ static void ebt_log(const struct sk_buff *skb, unsigned int hooknr, | |||
88 | } | 86 | } |
89 | printk(" IP SRC=%u.%u.%u.%u IP DST=%u.%u.%u.%u,", | 87 | printk(" IP SRC=%u.%u.%u.%u IP DST=%u.%u.%u.%u,", |
90 | NIPQUAD(ih->saddr), NIPQUAD(ih->daddr)); | 88 | NIPQUAD(ih->saddr), NIPQUAD(ih->daddr)); |
91 | printk(" IP tos=0x%02X, IP proto=%d", u.iph.tos, | 89 | printk(" IP tos=0x%02X, IP proto=%d", ih->tos, |
92 | ih->protocol); | 90 | ih->protocol); |
93 | if (ih->protocol == IPPROTO_TCP || | 91 | if (ih->protocol == IPPROTO_TCP || |
94 | ih->protocol == IPPROTO_UDP) { | 92 | ih->protocol == IPPROTO_UDP) { |
@@ -127,7 +125,7 @@ static void ebt_log(const struct sk_buff *skb, unsigned int hooknr, | |||
127 | ah->ar_pln == sizeof(uint32_t)) { | 125 | ah->ar_pln == sizeof(uint32_t)) { |
128 | struct arppayload _arpp, *ap; | 126 | struct arppayload _arpp, *ap; |
129 | 127 | ||
130 | ap = skb_header_pointer(skb, sizeof(u.arph), | 128 | ap = skb_header_pointer(skb, sizeof(_arph), |
131 | sizeof(_arpp), &_arpp); | 129 | sizeof(_arpp), &_arpp); |
132 | if (ap == NULL) { | 130 | if (ap == NULL) { |
133 | printk(" INCOMPLETE ARP payload"); | 131 | printk(" INCOMPLETE ARP payload"); |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 851eb927ed97..1beb782ac41b 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -1598,6 +1598,8 @@ static int neightbl_fill_info(struct neigh_table *tbl, struct sk_buff *skb, | |||
1598 | 1598 | ||
1599 | read_lock_bh(&tbl->lock); | 1599 | read_lock_bh(&tbl->lock); |
1600 | ndtmsg->ndtm_family = tbl->family; | 1600 | ndtmsg->ndtm_family = tbl->family; |
1601 | ndtmsg->ndtm_pad1 = 0; | ||
1602 | ndtmsg->ndtm_pad2 = 0; | ||
1601 | 1603 | ||
1602 | RTA_PUT_STRING(skb, NDTA_NAME, tbl->id); | 1604 | RTA_PUT_STRING(skb, NDTA_NAME, tbl->id); |
1603 | RTA_PUT_MSECS(skb, NDTA_GC_INTERVAL, tbl->gc_interval); | 1605 | RTA_PUT_MSECS(skb, NDTA_GC_INTERVAL, tbl->gc_interval); |
@@ -1683,6 +1685,8 @@ static int neightbl_fill_param_info(struct neigh_table *tbl, | |||
1683 | 1685 | ||
1684 | read_lock_bh(&tbl->lock); | 1686 | read_lock_bh(&tbl->lock); |
1685 | ndtmsg->ndtm_family = tbl->family; | 1687 | ndtmsg->ndtm_family = tbl->family; |
1688 | ndtmsg->ndtm_pad1 = 0; | ||
1689 | ndtmsg->ndtm_pad2 = 0; | ||
1686 | RTA_PUT_STRING(skb, NDTA_NAME, tbl->id); | 1690 | RTA_PUT_STRING(skb, NDTA_NAME, tbl->id); |
1687 | 1691 | ||
1688 | if (neightbl_fill_parms(skb, parms) < 0) | 1692 | if (neightbl_fill_parms(skb, parms) < 0) |
@@ -1872,6 +1876,8 @@ static int neigh_fill_info(struct sk_buff *skb, struct neighbour *n, | |||
1872 | struct ndmsg *ndm = NLMSG_DATA(nlh); | 1876 | struct ndmsg *ndm = NLMSG_DATA(nlh); |
1873 | 1877 | ||
1874 | ndm->ndm_family = n->ops->family; | 1878 | ndm->ndm_family = n->ops->family; |
1879 | ndm->ndm_pad1 = 0; | ||
1880 | ndm->ndm_pad2 = 0; | ||
1875 | ndm->ndm_flags = n->flags; | 1881 | ndm->ndm_flags = n->flags; |
1876 | ndm->ndm_type = n->type; | 1882 | ndm->ndm_type = n->type; |
1877 | ndm->ndm_ifindex = n->dev->ifindex; | 1883 | ndm->ndm_ifindex = n->dev->ifindex; |
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index e013d836a7ab..4b1bb30e6381 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -126,6 +126,7 @@ void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const void *data | |||
126 | rta->rta_type = attrtype; | 126 | rta->rta_type = attrtype; |
127 | rta->rta_len = size; | 127 | rta->rta_len = size; |
128 | memcpy(RTA_DATA(rta), data, attrlen); | 128 | memcpy(RTA_DATA(rta), data, attrlen); |
129 | memset(RTA_DATA(rta) + attrlen, 0, RTA_ALIGN(size) - size); | ||
129 | } | 130 | } |
130 | 131 | ||
131 | size_t rtattr_strlcpy(char *dest, const struct rtattr *rta, size_t size) | 132 | size_t rtattr_strlcpy(char *dest, const struct rtattr *rta, size_t size) |
@@ -188,6 +189,7 @@ static int rtnetlink_fill_ifinfo(struct sk_buff *skb, struct net_device *dev, | |||
188 | nlh = NLMSG_NEW(skb, pid, seq, type, sizeof(*r), flags); | 189 | nlh = NLMSG_NEW(skb, pid, seq, type, sizeof(*r), flags); |
189 | r = NLMSG_DATA(nlh); | 190 | r = NLMSG_DATA(nlh); |
190 | r->ifi_family = AF_UNSPEC; | 191 | r->ifi_family = AF_UNSPEC; |
192 | r->__ifi_pad = 0; | ||
191 | r->ifi_type = dev->type; | 193 | r->ifi_type = dev->type; |
192 | r->ifi_index = dev->ifindex; | 194 | r->ifi_index = dev->ifindex; |
193 | r->ifi_flags = dev_get_flags(dev); | 195 | r->ifi_flags = dev_get_flags(dev); |
diff --git a/net/core/wireless.c b/net/core/wireless.c index b2fe378dfbf8..3ff5639c0b78 100644 --- a/net/core/wireless.c +++ b/net/core/wireless.c | |||
@@ -1102,6 +1102,7 @@ static inline int rtnetlink_fill_iwinfo(struct sk_buff * skb, | |||
1102 | nlh = NLMSG_PUT(skb, 0, 0, type, sizeof(*r)); | 1102 | nlh = NLMSG_PUT(skb, 0, 0, type, sizeof(*r)); |
1103 | r = NLMSG_DATA(nlh); | 1103 | r = NLMSG_DATA(nlh); |
1104 | r->ifi_family = AF_UNSPEC; | 1104 | r->ifi_family = AF_UNSPEC; |
1105 | r->__ifi_pad = 0; | ||
1105 | r->ifi_type = dev->type; | 1106 | r->ifi_type = dev->type; |
1106 | r->ifi_index = dev->ifindex; | 1107 | r->ifi_index = dev->ifindex; |
1107 | r->ifi_flags = dev->flags; | 1108 | r->ifi_flags = dev->flags; |
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c index 6617ea47d365..ab60ea63688e 100644 --- a/net/ethernet/eth.c +++ b/net/ethernet/eth.c | |||
@@ -92,10 +92,9 @@ int eth_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, | |||
92 | * Set the source hardware address. | 92 | * Set the source hardware address. |
93 | */ | 93 | */ |
94 | 94 | ||
95 | if(saddr) | 95 | if(!saddr) |
96 | memcpy(eth->h_source,saddr,dev->addr_len); | 96 | saddr = dev->dev_addr; |
97 | else | 97 | memcpy(eth->h_source,saddr,dev->addr_len); |
98 | memcpy(eth->h_source,dev->dev_addr,dev->addr_len); | ||
99 | 98 | ||
100 | /* | 99 | /* |
101 | * Anyway, the loopback-device should never use this function... | 100 | * Anyway, the loopback-device should never use this function... |
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 0671569ee6f0..b56e88edf1b3 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -43,7 +43,7 @@ | |||
43 | * 2 of the License, or (at your option) any later version. | 43 | * 2 of the License, or (at your option) any later version. |
44 | */ | 44 | */ |
45 | 45 | ||
46 | #define VERSION "0.323" | 46 | #define VERSION "0.324" |
47 | 47 | ||
48 | #include <linux/config.h> | 48 | #include <linux/config.h> |
49 | #include <asm/uaccess.h> | 49 | #include <asm/uaccess.h> |
@@ -341,8 +341,10 @@ static struct leaf *leaf_new(void) | |||
341 | static struct leaf_info *leaf_info_new(int plen) | 341 | static struct leaf_info *leaf_info_new(int plen) |
342 | { | 342 | { |
343 | struct leaf_info *li = kmalloc(sizeof(struct leaf_info), GFP_KERNEL); | 343 | struct leaf_info *li = kmalloc(sizeof(struct leaf_info), GFP_KERNEL); |
344 | li->plen = plen; | 344 | if(li) { |
345 | INIT_LIST_HEAD(&li->falh); | 345 | li->plen = plen; |
346 | INIT_LIST_HEAD(&li->falh); | ||
347 | } | ||
346 | return li; | 348 | return li; |
347 | } | 349 | } |
348 | 350 | ||
@@ -879,8 +881,8 @@ static struct node *trie_rebalance(struct trie *t, struct tnode *tn) | |||
879 | return (struct node*) tn; | 881 | return (struct node*) tn; |
880 | } | 882 | } |
881 | 883 | ||
882 | static struct list_head * | 884 | static struct list_head * |
883 | fib_insert_node(struct trie *t, u32 key, int plen) | 885 | fib_insert_node(struct trie *t, int *err, u32 key, int plen) |
884 | { | 886 | { |
885 | int pos, newpos; | 887 | int pos, newpos; |
886 | struct tnode *tp = NULL, *tn = NULL; | 888 | struct tnode *tp = NULL, *tn = NULL; |
@@ -940,7 +942,6 @@ fib_insert_node(struct trie *t, u32 key, int plen) | |||
940 | if(tp && IS_LEAF(tp)) | 942 | if(tp && IS_LEAF(tp)) |
941 | BUG(); | 943 | BUG(); |
942 | 944 | ||
943 | t->revision++; | ||
944 | 945 | ||
945 | /* Case 1: n is a leaf. Compare prefixes */ | 946 | /* Case 1: n is a leaf. Compare prefixes */ |
946 | 947 | ||
@@ -949,8 +950,10 @@ fib_insert_node(struct trie *t, u32 key, int plen) | |||
949 | 950 | ||
950 | li = leaf_info_new(plen); | 951 | li = leaf_info_new(plen); |
951 | 952 | ||
952 | if(! li) | 953 | if(! li) { |
953 | BUG(); | 954 | *err = -ENOMEM; |
955 | goto err; | ||
956 | } | ||
954 | 957 | ||
955 | fa_head = &li->falh; | 958 | fa_head = &li->falh; |
956 | insert_leaf_info(&l->list, li); | 959 | insert_leaf_info(&l->list, li); |
@@ -959,14 +962,19 @@ fib_insert_node(struct trie *t, u32 key, int plen) | |||
959 | t->size++; | 962 | t->size++; |
960 | l = leaf_new(); | 963 | l = leaf_new(); |
961 | 964 | ||
962 | if(! l) | 965 | if(! l) { |
963 | BUG(); | 966 | *err = -ENOMEM; |
967 | goto err; | ||
968 | } | ||
964 | 969 | ||
965 | l->key = key; | 970 | l->key = key; |
966 | li = leaf_info_new(plen); | 971 | li = leaf_info_new(plen); |
967 | 972 | ||
968 | if(! li) | 973 | if(! li) { |
969 | BUG(); | 974 | tnode_free((struct tnode *) l); |
975 | *err = -ENOMEM; | ||
976 | goto err; | ||
977 | } | ||
970 | 978 | ||
971 | fa_head = &li->falh; | 979 | fa_head = &li->falh; |
972 | insert_leaf_info(&l->list, li); | 980 | insert_leaf_info(&l->list, li); |
@@ -1003,9 +1011,14 @@ fib_insert_node(struct trie *t, u32 key, int plen) | |||
1003 | newpos = 0; | 1011 | newpos = 0; |
1004 | tn = tnode_new(key, newpos, 1); /* First tnode */ | 1012 | tn = tnode_new(key, newpos, 1); /* First tnode */ |
1005 | } | 1013 | } |
1006 | if(!tn) | ||
1007 | trie_bug("tnode_pfx_new failed"); | ||
1008 | 1014 | ||
1015 | if(!tn) { | ||
1016 | free_leaf_info(li); | ||
1017 | tnode_free((struct tnode *) l); | ||
1018 | *err = -ENOMEM; | ||
1019 | goto err; | ||
1020 | } | ||
1021 | |||
1009 | NODE_SET_PARENT(tn, tp); | 1022 | NODE_SET_PARENT(tn, tp); |
1010 | 1023 | ||
1011 | missbit=tkey_extract_bits(key, newpos, 1); | 1024 | missbit=tkey_extract_bits(key, newpos, 1); |
@@ -1027,7 +1040,9 @@ fib_insert_node(struct trie *t, u32 key, int plen) | |||
1027 | } | 1040 | } |
1028 | /* Rebalance the trie */ | 1041 | /* Rebalance the trie */ |
1029 | t->trie = trie_rebalance(t, tp); | 1042 | t->trie = trie_rebalance(t, tp); |
1030 | done:; | 1043 | done: |
1044 | t->revision++; | ||
1045 | err:; | ||
1031 | return fa_head; | 1046 | return fa_head; |
1032 | } | 1047 | } |
1033 | 1048 | ||
@@ -1156,8 +1171,12 @@ fn_trie_insert(struct fib_table *tb, struct rtmsg *r, struct kern_rta *rta, | |||
1156 | * Insert new entry to the list. | 1171 | * Insert new entry to the list. |
1157 | */ | 1172 | */ |
1158 | 1173 | ||
1159 | if(!fa_head) | 1174 | if(!fa_head) { |
1160 | fa_head = fib_insert_node(t, key, plen); | 1175 | fa_head = fib_insert_node(t, &err, key, plen); |
1176 | err = 0; | ||
1177 | if(err) | ||
1178 | goto out_free_new_fa; | ||
1179 | } | ||
1161 | 1180 | ||
1162 | write_lock_bh(&fib_lock); | 1181 | write_lock_bh(&fib_lock); |
1163 | 1182 | ||
@@ -1170,6 +1189,9 @@ fn_trie_insert(struct fib_table *tb, struct rtmsg *r, struct kern_rta *rta, | |||
1170 | rtmsg_fib(RTM_NEWROUTE, htonl(key), new_fa, plen, tb->tb_id, nlhdr, req); | 1189 | rtmsg_fib(RTM_NEWROUTE, htonl(key), new_fa, plen, tb->tb_id, nlhdr, req); |
1171 | succeeded: | 1190 | succeeded: |
1172 | return 0; | 1191 | return 0; |
1192 | |||
1193 | out_free_new_fa: | ||
1194 | kmem_cache_free(fn_alias_kmem, new_fa); | ||
1173 | out: | 1195 | out: |
1174 | fib_release_info(fi); | 1196 | fib_release_info(fi); |
1175 | err:; | 1197 | err:; |
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index af2ec88bbb2f..c703528e0bcd 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c | |||
@@ -283,14 +283,18 @@ static inline int ip_rcv_finish(struct sk_buff *skb) | |||
283 | { | 283 | { |
284 | struct net_device *dev = skb->dev; | 284 | struct net_device *dev = skb->dev; |
285 | struct iphdr *iph = skb->nh.iph; | 285 | struct iphdr *iph = skb->nh.iph; |
286 | int err; | ||
286 | 287 | ||
287 | /* | 288 | /* |
288 | * Initialise the virtual path cache for the packet. It describes | 289 | * Initialise the virtual path cache for the packet. It describes |
289 | * how the packet travels inside Linux networking. | 290 | * how the packet travels inside Linux networking. |
290 | */ | 291 | */ |
291 | if (skb->dst == NULL) { | 292 | if (skb->dst == NULL) { |
292 | if (ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, dev)) | 293 | if ((err = ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, dev))) { |
294 | if (err == -EHOSTUNREACH) | ||
295 | IP_INC_STATS_BH(IPSTATS_MIB_INADDRERRORS); | ||
293 | goto drop; | 296 | goto drop; |
297 | } | ||
294 | } | 298 | } |
295 | 299 | ||
296 | #ifdef CONFIG_NET_CLS_ROUTE | 300 | #ifdef CONFIG_NET_CLS_ROUTE |
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index ee07aec215a0..6ce5c3292f9f 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -188,7 +188,13 @@ static inline int ip_finish_output2(struct sk_buff *skb) | |||
188 | skb = skb2; | 188 | skb = skb2; |
189 | } | 189 | } |
190 | 190 | ||
191 | nf_reset(skb); | 191 | #ifdef CONFIG_BRIDGE_NETFILTER |
192 | /* bridge-netfilter defers calling some IP hooks to the bridge layer | ||
193 | * and still needs the conntrack reference. | ||
194 | */ | ||
195 | if (skb->nf_bridge == NULL) | ||
196 | #endif | ||
197 | nf_reset(skb); | ||
192 | 198 | ||
193 | if (hh) { | 199 | if (hh) { |
194 | int hh_alen; | 200 | int hh_alen; |
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index f2509034ce72..d2bf8e1930a3 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c | |||
@@ -1149,8 +1149,10 @@ static int __init ic_dynamic(void) | |||
1149 | ic_rarp_cleanup(); | 1149 | ic_rarp_cleanup(); |
1150 | #endif | 1150 | #endif |
1151 | 1151 | ||
1152 | if (!ic_got_reply) | 1152 | if (!ic_got_reply) { |
1153 | ic_myaddr = INADDR_NONE; | ||
1153 | return -1; | 1154 | return -1; |
1155 | } | ||
1154 | 1156 | ||
1155 | printk("IP-Config: Got %s answer from %u.%u.%u.%u, ", | 1157 | printk("IP-Config: Got %s answer from %u.%u.%u.%u, ", |
1156 | ((ic_got_reply & IC_RARP) ? "RARP" | 1158 | ((ic_got_reply & IC_RARP) ? "RARP" |
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index e4f809a93f47..7833d920bdba 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -297,6 +297,7 @@ static int vif_delete(int vifi) | |||
297 | static void ipmr_destroy_unres(struct mfc_cache *c) | 297 | static void ipmr_destroy_unres(struct mfc_cache *c) |
298 | { | 298 | { |
299 | struct sk_buff *skb; | 299 | struct sk_buff *skb; |
300 | struct nlmsgerr *e; | ||
300 | 301 | ||
301 | atomic_dec(&cache_resolve_queue_len); | 302 | atomic_dec(&cache_resolve_queue_len); |
302 | 303 | ||
@@ -306,7 +307,9 @@ static void ipmr_destroy_unres(struct mfc_cache *c) | |||
306 | nlh->nlmsg_type = NLMSG_ERROR; | 307 | nlh->nlmsg_type = NLMSG_ERROR; |
307 | nlh->nlmsg_len = NLMSG_LENGTH(sizeof(struct nlmsgerr)); | 308 | nlh->nlmsg_len = NLMSG_LENGTH(sizeof(struct nlmsgerr)); |
308 | skb_trim(skb, nlh->nlmsg_len); | 309 | skb_trim(skb, nlh->nlmsg_len); |
309 | ((struct nlmsgerr*)NLMSG_DATA(nlh))->error = -ETIMEDOUT; | 310 | e = NLMSG_DATA(nlh); |
311 | e->error = -ETIMEDOUT; | ||
312 | memset(&e->msg, 0, sizeof(e->msg)); | ||
310 | netlink_unicast(rtnl, skb, NETLINK_CB(skb).dst_pid, MSG_DONTWAIT); | 313 | netlink_unicast(rtnl, skb, NETLINK_CB(skb).dst_pid, MSG_DONTWAIT); |
311 | } else | 314 | } else |
312 | kfree_skb(skb); | 315 | kfree_skb(skb); |
@@ -499,6 +502,7 @@ static struct mfc_cache *ipmr_cache_alloc_unres(void) | |||
499 | static void ipmr_cache_resolve(struct mfc_cache *uc, struct mfc_cache *c) | 502 | static void ipmr_cache_resolve(struct mfc_cache *uc, struct mfc_cache *c) |
500 | { | 503 | { |
501 | struct sk_buff *skb; | 504 | struct sk_buff *skb; |
505 | struct nlmsgerr *e; | ||
502 | 506 | ||
503 | /* | 507 | /* |
504 | * Play the pending entries through our router | 508 | * Play the pending entries through our router |
@@ -515,7 +519,9 @@ static void ipmr_cache_resolve(struct mfc_cache *uc, struct mfc_cache *c) | |||
515 | nlh->nlmsg_type = NLMSG_ERROR; | 519 | nlh->nlmsg_type = NLMSG_ERROR; |
516 | nlh->nlmsg_len = NLMSG_LENGTH(sizeof(struct nlmsgerr)); | 520 | nlh->nlmsg_len = NLMSG_LENGTH(sizeof(struct nlmsgerr)); |
517 | skb_trim(skb, nlh->nlmsg_len); | 521 | skb_trim(skb, nlh->nlmsg_len); |
518 | ((struct nlmsgerr*)NLMSG_DATA(nlh))->error = -EMSGSIZE; | 522 | e = NLMSG_DATA(nlh); |
523 | e->error = -EMSGSIZE; | ||
524 | memset(&e->msg, 0, sizeof(e->msg)); | ||
519 | } | 525 | } |
520 | err = netlink_unicast(rtnl, skb, NETLINK_CB(skb).dst_pid, MSG_DONTWAIT); | 526 | err = netlink_unicast(rtnl, skb, NETLINK_CB(skb).dst_pid, MSG_DONTWAIT); |
521 | } else | 527 | } else |
diff --git a/net/ipv4/ipvs/ip_vs_conn.c b/net/ipv4/ipvs/ip_vs_conn.c index fd6feb5499fe..9f16ab309106 100644 --- a/net/ipv4/ipvs/ip_vs_conn.c +++ b/net/ipv4/ipvs/ip_vs_conn.c | |||
@@ -548,7 +548,6 @@ void ip_vs_conn_expire_now(struct ip_vs_conn *cp) | |||
548 | { | 548 | { |
549 | if (del_timer(&cp->timer)) | 549 | if (del_timer(&cp->timer)) |
550 | mod_timer(&cp->timer, jiffies); | 550 | mod_timer(&cp->timer, jiffies); |
551 | __ip_vs_conn_put(cp); | ||
552 | } | 551 | } |
553 | 552 | ||
554 | 553 | ||
@@ -764,7 +763,6 @@ void ip_vs_random_dropentry(void) | |||
764 | { | 763 | { |
765 | int idx; | 764 | int idx; |
766 | struct ip_vs_conn *cp; | 765 | struct ip_vs_conn *cp; |
767 | struct ip_vs_conn *ct; | ||
768 | 766 | ||
769 | /* | 767 | /* |
770 | * Randomly scan 1/32 of the whole table every second | 768 | * Randomly scan 1/32 of the whole table every second |
@@ -801,21 +799,12 @@ void ip_vs_random_dropentry(void) | |||
801 | continue; | 799 | continue; |
802 | } | 800 | } |
803 | 801 | ||
804 | /* | ||
805 | * Drop the entry, and drop its ct if not referenced | ||
806 | */ | ||
807 | atomic_inc(&cp->refcnt); | ||
808 | ct_write_unlock(hash); | ||
809 | |||
810 | if ((ct = cp->control)) | ||
811 | atomic_inc(&ct->refcnt); | ||
812 | IP_VS_DBG(4, "del connection\n"); | 802 | IP_VS_DBG(4, "del connection\n"); |
813 | ip_vs_conn_expire_now(cp); | 803 | ip_vs_conn_expire_now(cp); |
814 | if (ct) { | 804 | if (cp->control) { |
815 | IP_VS_DBG(4, "del conn template\n"); | 805 | IP_VS_DBG(4, "del conn template\n"); |
816 | ip_vs_conn_expire_now(ct); | 806 | ip_vs_conn_expire_now(cp->control); |
817 | } | 807 | } |
818 | ct_write_lock(hash); | ||
819 | } | 808 | } |
820 | ct_write_unlock(hash); | 809 | ct_write_unlock(hash); |
821 | } | 810 | } |
@@ -829,7 +818,6 @@ static void ip_vs_conn_flush(void) | |||
829 | { | 818 | { |
830 | int idx; | 819 | int idx; |
831 | struct ip_vs_conn *cp; | 820 | struct ip_vs_conn *cp; |
832 | struct ip_vs_conn *ct; | ||
833 | 821 | ||
834 | flush_again: | 822 | flush_again: |
835 | for (idx=0; idx<IP_VS_CONN_TAB_SIZE; idx++) { | 823 | for (idx=0; idx<IP_VS_CONN_TAB_SIZE; idx++) { |
@@ -839,18 +827,13 @@ static void ip_vs_conn_flush(void) | |||
839 | ct_write_lock_bh(idx); | 827 | ct_write_lock_bh(idx); |
840 | 828 | ||
841 | list_for_each_entry(cp, &ip_vs_conn_tab[idx], c_list) { | 829 | list_for_each_entry(cp, &ip_vs_conn_tab[idx], c_list) { |
842 | atomic_inc(&cp->refcnt); | ||
843 | ct_write_unlock(idx); | ||
844 | 830 | ||
845 | if ((ct = cp->control)) | ||
846 | atomic_inc(&ct->refcnt); | ||
847 | IP_VS_DBG(4, "del connection\n"); | 831 | IP_VS_DBG(4, "del connection\n"); |
848 | ip_vs_conn_expire_now(cp); | 832 | ip_vs_conn_expire_now(cp); |
849 | if (ct) { | 833 | if (cp->control) { |
850 | IP_VS_DBG(4, "del conn template\n"); | 834 | IP_VS_DBG(4, "del conn template\n"); |
851 | ip_vs_conn_expire_now(ct); | 835 | ip_vs_conn_expire_now(cp->control); |
852 | } | 836 | } |
853 | ct_write_lock(idx); | ||
854 | } | 837 | } |
855 | ct_write_unlock_bh(idx); | 838 | ct_write_unlock_bh(idx); |
856 | } | 839 | } |
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index 9cde8c61f525..6706d3a1bc4f 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <linux/netfilter_ipv4/ipt_CLUSTERIP.h> | 30 | #include <linux/netfilter_ipv4/ipt_CLUSTERIP.h> |
31 | #include <linux/netfilter_ipv4/ip_conntrack.h> | 31 | #include <linux/netfilter_ipv4/ip_conntrack.h> |
32 | 32 | ||
33 | #define CLUSTERIP_VERSION "0.6" | 33 | #define CLUSTERIP_VERSION "0.7" |
34 | 34 | ||
35 | #define DEBUG_CLUSTERIP | 35 | #define DEBUG_CLUSTERIP |
36 | 36 | ||
@@ -524,8 +524,9 @@ arp_mangle(unsigned int hook, | |||
524 | || arp->ar_pln != 4 || arp->ar_hln != ETH_ALEN) | 524 | || arp->ar_pln != 4 || arp->ar_hln != ETH_ALEN) |
525 | return NF_ACCEPT; | 525 | return NF_ACCEPT; |
526 | 526 | ||
527 | /* we only want to mangle arp replies */ | 527 | /* we only want to mangle arp requests and replies */ |
528 | if (arp->ar_op != htons(ARPOP_REPLY)) | 528 | if (arp->ar_op != htons(ARPOP_REPLY) |
529 | && arp->ar_op != htons(ARPOP_REQUEST)) | ||
529 | return NF_ACCEPT; | 530 | return NF_ACCEPT; |
530 | 531 | ||
531 | payload = (void *)(arp+1); | 532 | payload = (void *)(arp+1); |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 80cf633d9f4a..12a1cf306f67 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -1909,7 +1909,7 @@ static int ip_route_input_slow(struct sk_buff *skb, u32 daddr, u32 saddr, | |||
1909 | */ | 1909 | */ |
1910 | if ((err = fib_lookup(&fl, &res)) != 0) { | 1910 | if ((err = fib_lookup(&fl, &res)) != 0) { |
1911 | if (!IN_DEV_FORWARD(in_dev)) | 1911 | if (!IN_DEV_FORWARD(in_dev)) |
1912 | goto e_inval; | 1912 | goto e_hostunreach; |
1913 | goto no_route; | 1913 | goto no_route; |
1914 | } | 1914 | } |
1915 | free_res = 1; | 1915 | free_res = 1; |
@@ -1933,7 +1933,7 @@ static int ip_route_input_slow(struct sk_buff *skb, u32 daddr, u32 saddr, | |||
1933 | } | 1933 | } |
1934 | 1934 | ||
1935 | if (!IN_DEV_FORWARD(in_dev)) | 1935 | if (!IN_DEV_FORWARD(in_dev)) |
1936 | goto e_inval; | 1936 | goto e_hostunreach; |
1937 | if (res.type != RTN_UNICAST) | 1937 | if (res.type != RTN_UNICAST) |
1938 | goto martian_destination; | 1938 | goto martian_destination; |
1939 | 1939 | ||
@@ -2025,6 +2025,11 @@ martian_destination: | |||
2025 | "%u.%u.%u.%u, dev %s\n", | 2025 | "%u.%u.%u.%u, dev %s\n", |
2026 | NIPQUAD(daddr), NIPQUAD(saddr), dev->name); | 2026 | NIPQUAD(daddr), NIPQUAD(saddr), dev->name); |
2027 | #endif | 2027 | #endif |
2028 | |||
2029 | e_hostunreach: | ||
2030 | err = -EHOSTUNREACH; | ||
2031 | goto done; | ||
2032 | |||
2028 | e_inval: | 2033 | e_inval: |
2029 | err = -EINVAL; | 2034 | err = -EINVAL; |
2030 | goto done; | 2035 | goto done; |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index a54d4ef3fd35..77004b9456c0 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -2777,7 +2777,7 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb, | |||
2777 | read_lock_bh(&idev->lock); | 2777 | read_lock_bh(&idev->lock); |
2778 | switch (type) { | 2778 | switch (type) { |
2779 | case UNICAST_ADDR: | 2779 | case UNICAST_ADDR: |
2780 | /* unicast address */ | 2780 | /* unicast address incl. temp addr */ |
2781 | for (ifa = idev->addr_list; ifa; | 2781 | for (ifa = idev->addr_list; ifa; |
2782 | ifa = ifa->if_next, ip_idx++) { | 2782 | ifa = ifa->if_next, ip_idx++) { |
2783 | if (ip_idx < s_ip_idx) | 2783 | if (ip_idx < s_ip_idx) |
@@ -2788,19 +2788,6 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb, | |||
2788 | NLM_F_MULTI)) <= 0) | 2788 | NLM_F_MULTI)) <= 0) |
2789 | goto done; | 2789 | goto done; |
2790 | } | 2790 | } |
2791 | /* temp addr */ | ||
2792 | #ifdef CONFIG_IPV6_PRIVACY | ||
2793 | for (ifa = idev->tempaddr_list; ifa; | ||
2794 | ifa = ifa->tmp_next, ip_idx++) { | ||
2795 | if (ip_idx < s_ip_idx) | ||
2796 | continue; | ||
2797 | if ((err = inet6_fill_ifaddr(skb, ifa, | ||
2798 | NETLINK_CB(cb->skb).pid, | ||
2799 | cb->nlh->nlmsg_seq, RTM_NEWADDR, | ||
2800 | NLM_F_MULTI)) <= 0) | ||
2801 | goto done; | ||
2802 | } | ||
2803 | #endif | ||
2804 | break; | 2791 | break; |
2805 | case MULTICAST_ADDR: | 2792 | case MULTICAST_ADDR: |
2806 | /* multicast address */ | 2793 | /* multicast address */ |
@@ -2923,6 +2910,7 @@ static int inet6_fill_ifinfo(struct sk_buff *skb, struct inet6_dev *idev, | |||
2923 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*r), flags); | 2910 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*r), flags); |
2924 | r = NLMSG_DATA(nlh); | 2911 | r = NLMSG_DATA(nlh); |
2925 | r->ifi_family = AF_INET6; | 2912 | r->ifi_family = AF_INET6; |
2913 | r->__ifi_pad = 0; | ||
2926 | r->ifi_type = dev->type; | 2914 | r->ifi_type = dev->type; |
2927 | r->ifi_index = dev->ifindex; | 2915 | r->ifi_index = dev->ifindex; |
2928 | r->ifi_flags = dev_get_flags(dev); | 2916 | r->ifi_flags = dev_get_flags(dev); |
@@ -3030,9 +3018,12 @@ static int inet6_fill_prefix(struct sk_buff *skb, struct inet6_dev *idev, | |||
3030 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*pmsg), flags); | 3018 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*pmsg), flags); |
3031 | pmsg = NLMSG_DATA(nlh); | 3019 | pmsg = NLMSG_DATA(nlh); |
3032 | pmsg->prefix_family = AF_INET6; | 3020 | pmsg->prefix_family = AF_INET6; |
3021 | pmsg->prefix_pad1 = 0; | ||
3022 | pmsg->prefix_pad2 = 0; | ||
3033 | pmsg->prefix_ifindex = idev->dev->ifindex; | 3023 | pmsg->prefix_ifindex = idev->dev->ifindex; |
3034 | pmsg->prefix_len = pinfo->prefix_len; | 3024 | pmsg->prefix_len = pinfo->prefix_len; |
3035 | pmsg->prefix_type = pinfo->type; | 3025 | pmsg->prefix_type = pinfo->type; |
3026 | pmsg->prefix_pad3 = 0; | ||
3036 | 3027 | ||
3037 | pmsg->prefix_flags = 0; | 3028 | pmsg->prefix_flags = 0; |
3038 | if (pinfo->onlink) | 3029 | if (pinfo->onlink) |
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index 0e5f7499debb..b6c73da5ff35 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c | |||
@@ -244,7 +244,6 @@ struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions * opt_space, | |||
244 | opt_space->opt_nflen = 0; | 244 | opt_space->opt_nflen = 0; |
245 | } | 245 | } |
246 | opt_space->dst1opt = fopt->dst1opt; | 246 | opt_space->dst1opt = fopt->dst1opt; |
247 | opt_space->auth = fopt->auth; | ||
248 | opt_space->opt_flen = fopt->opt_flen; | 247 | opt_space->opt_flen = fopt->opt_flen; |
249 | return opt_space; | 248 | return opt_space; |
250 | } | 249 | } |
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 9594206e6035..249c61936ea0 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c | |||
@@ -439,6 +439,8 @@ tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq, | |||
439 | 439 | ||
440 | t = NLMSG_DATA(nlh); | 440 | t = NLMSG_DATA(nlh); |
441 | t->tca_family = AF_UNSPEC; | 441 | t->tca_family = AF_UNSPEC; |
442 | t->tca__pad1 = 0; | ||
443 | t->tca__pad2 = 0; | ||
442 | 444 | ||
443 | x = (struct rtattr*) skb->tail; | 445 | x = (struct rtattr*) skb->tail; |
444 | RTA_PUT(skb, TCA_ACT_TAB, 0, NULL); | 446 | RTA_PUT(skb, TCA_ACT_TAB, 0, NULL); |
@@ -580,6 +582,8 @@ static int tca_action_flush(struct rtattr *rta, struct nlmsghdr *n, u32 pid) | |||
580 | nlh = NLMSG_PUT(skb, pid, n->nlmsg_seq, RTM_DELACTION, sizeof(*t)); | 582 | nlh = NLMSG_PUT(skb, pid, n->nlmsg_seq, RTM_DELACTION, sizeof(*t)); |
581 | t = NLMSG_DATA(nlh); | 583 | t = NLMSG_DATA(nlh); |
582 | t->tca_family = AF_UNSPEC; | 584 | t->tca_family = AF_UNSPEC; |
585 | t->tca__pad1 = 0; | ||
586 | t->tca__pad2 = 0; | ||
583 | 587 | ||
584 | x = (struct rtattr *) skb->tail; | 588 | x = (struct rtattr *) skb->tail; |
585 | RTA_PUT(skb, TCA_ACT_TAB, 0, NULL); | 589 | RTA_PUT(skb, TCA_ACT_TAB, 0, NULL); |
@@ -687,7 +691,9 @@ static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, | |||
687 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*t), flags); | 691 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*t), flags); |
688 | t = NLMSG_DATA(nlh); | 692 | t = NLMSG_DATA(nlh); |
689 | t->tca_family = AF_UNSPEC; | 693 | t->tca_family = AF_UNSPEC; |
690 | 694 | t->tca__pad1 = 0; | |
695 | t->tca__pad2 = 0; | ||
696 | |||
691 | x = (struct rtattr*) skb->tail; | 697 | x = (struct rtattr*) skb->tail; |
692 | RTA_PUT(skb, TCA_ACT_TAB, 0, NULL); | 698 | RTA_PUT(skb, TCA_ACT_TAB, 0, NULL); |
693 | 699 | ||
@@ -842,6 +848,8 @@ tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb) | |||
842 | cb->nlh->nlmsg_type, sizeof(*t)); | 848 | cb->nlh->nlmsg_type, sizeof(*t)); |
843 | t = NLMSG_DATA(nlh); | 849 | t = NLMSG_DATA(nlh); |
844 | t->tca_family = AF_UNSPEC; | 850 | t->tca_family = AF_UNSPEC; |
851 | t->tca__pad1 = 0; | ||
852 | t->tca__pad2 = 0; | ||
845 | 853 | ||
846 | x = (struct rtattr *) skb->tail; | 854 | x = (struct rtattr *) skb->tail; |
847 | RTA_PUT(skb, TCA_ACT_TAB, 0, NULL); | 855 | RTA_PUT(skb, TCA_ACT_TAB, 0, NULL); |
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 1616bf5c9627..3b5714ef4d1a 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c | |||
@@ -331,6 +331,8 @@ tcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp, unsigned long fh, | |||
331 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags); | 331 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags); |
332 | tcm = NLMSG_DATA(nlh); | 332 | tcm = NLMSG_DATA(nlh); |
333 | tcm->tcm_family = AF_UNSPEC; | 333 | tcm->tcm_family = AF_UNSPEC; |
334 | tcm->tcm__pad1 = 0; | ||
335 | tcm->tcm__pad1 = 0; | ||
334 | tcm->tcm_ifindex = tp->q->dev->ifindex; | 336 | tcm->tcm_ifindex = tp->q->dev->ifindex; |
335 | tcm->tcm_parent = tp->classid; | 337 | tcm->tcm_parent = tp->classid; |
336 | tcm->tcm_info = TC_H_MAKE(tp->prio, tp->protocol); | 338 | tcm->tcm_info = TC_H_MAKE(tp->prio, tp->protocol); |
diff --git a/net/sched/cls_rsvp.h b/net/sched/cls_rsvp.h index 232fb9196810..006168d69376 100644 --- a/net/sched/cls_rsvp.h +++ b/net/sched/cls_rsvp.h | |||
@@ -618,6 +618,7 @@ static int rsvp_dump(struct tcf_proto *tp, unsigned long fh, | |||
618 | pinfo.protocol = s->protocol; | 618 | pinfo.protocol = s->protocol; |
619 | pinfo.tunnelid = s->tunnelid; | 619 | pinfo.tunnelid = s->tunnelid; |
620 | pinfo.tunnelhdr = f->tunnelhdr; | 620 | pinfo.tunnelhdr = f->tunnelhdr; |
621 | pinfo.pad = 0; | ||
621 | RTA_PUT(skb, TCA_RSVP_PINFO, sizeof(pinfo), &pinfo); | 622 | RTA_PUT(skb, TCA_RSVP_PINFO, sizeof(pinfo), &pinfo); |
622 | if (f->res.classid) | 623 | if (f->res.classid) |
623 | RTA_PUT(skb, TCA_RSVP_CLASSID, 4, &f->res.classid); | 624 | RTA_PUT(skb, TCA_RSVP_CLASSID, 4, &f->res.classid); |
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 97c1c75d5c78..05e6e0a799da 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -770,6 +770,8 @@ static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid, | |||
770 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags); | 770 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags); |
771 | tcm = NLMSG_DATA(nlh); | 771 | tcm = NLMSG_DATA(nlh); |
772 | tcm->tcm_family = AF_UNSPEC; | 772 | tcm->tcm_family = AF_UNSPEC; |
773 | tcm->tcm__pad1 = 0; | ||
774 | tcm->tcm__pad2 = 0; | ||
773 | tcm->tcm_ifindex = q->dev->ifindex; | 775 | tcm->tcm_ifindex = q->dev->ifindex; |
774 | tcm->tcm_parent = clid; | 776 | tcm->tcm_parent = clid; |
775 | tcm->tcm_handle = q->handle; | 777 | tcm->tcm_handle = q->handle; |
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index d43e3b8cbf6a..09453f997d8c 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c | |||
@@ -1528,6 +1528,7 @@ static __inline__ int cbq_dump_ovl(struct sk_buff *skb, struct cbq_class *cl) | |||
1528 | 1528 | ||
1529 | opt.strategy = cl->ovl_strategy; | 1529 | opt.strategy = cl->ovl_strategy; |
1530 | opt.priority2 = cl->priority2+1; | 1530 | opt.priority2 = cl->priority2+1; |
1531 | opt.pad = 0; | ||
1531 | opt.penalty = (cl->penalty*1000)/HZ; | 1532 | opt.penalty = (cl->penalty*1000)/HZ; |
1532 | RTA_PUT(skb, TCA_CBQ_OVL_STRATEGY, sizeof(opt), &opt); | 1533 | RTA_PUT(skb, TCA_CBQ_OVL_STRATEGY, sizeof(opt), &opt); |
1533 | return skb->len; | 1534 | return skb->len; |
@@ -1563,6 +1564,8 @@ static __inline__ int cbq_dump_police(struct sk_buff *skb, struct cbq_class *cl) | |||
1563 | 1564 | ||
1564 | if (cl->police) { | 1565 | if (cl->police) { |
1565 | opt.police = cl->police; | 1566 | opt.police = cl->police; |
1567 | opt.__res1 = 0; | ||
1568 | opt.__res2 = 0; | ||
1566 | RTA_PUT(skb, TCA_CBQ_POLICE, sizeof(opt), &opt); | 1569 | RTA_PUT(skb, TCA_CBQ_POLICE, sizeof(opt), &opt); |
1567 | } | 1570 | } |
1568 | return skb->len; | 1571 | return skb->len; |
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c index 2ec0320fac3b..c44bf4165c6e 100644 --- a/net/sctp/endpointola.c +++ b/net/sctp/endpointola.c | |||
@@ -102,9 +102,9 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep, | |||
102 | /* Set up the base timeout information. */ | 102 | /* Set up the base timeout information. */ |
103 | ep->timeouts[SCTP_EVENT_TIMEOUT_NONE] = 0; | 103 | ep->timeouts[SCTP_EVENT_TIMEOUT_NONE] = 0; |
104 | ep->timeouts[SCTP_EVENT_TIMEOUT_T1_COOKIE] = | 104 | ep->timeouts[SCTP_EVENT_TIMEOUT_T1_COOKIE] = |
105 | SCTP_DEFAULT_TIMEOUT_T1_COOKIE; | 105 | msecs_to_jiffies(sp->rtoinfo.srto_initial); |
106 | ep->timeouts[SCTP_EVENT_TIMEOUT_T1_INIT] = | 106 | ep->timeouts[SCTP_EVENT_TIMEOUT_T1_INIT] = |
107 | SCTP_DEFAULT_TIMEOUT_T1_INIT; | 107 | msecs_to_jiffies(sp->rtoinfo.srto_initial); |
108 | ep->timeouts[SCTP_EVENT_TIMEOUT_T2_SHUTDOWN] = | 108 | ep->timeouts[SCTP_EVENT_TIMEOUT_T2_SHUTDOWN] = |
109 | msecs_to_jiffies(sp->rtoinfo.srto_initial); | 109 | msecs_to_jiffies(sp->rtoinfo.srto_initial); |
110 | ep->timeouts[SCTP_EVENT_TIMEOUT_T3_RTX] = 0; | 110 | ep->timeouts[SCTP_EVENT_TIMEOUT_T3_RTX] = 0; |
@@ -117,12 +117,9 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep, | |||
117 | ep->timeouts[SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD] | 117 | ep->timeouts[SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD] |
118 | = 5 * msecs_to_jiffies(sp->rtoinfo.srto_max); | 118 | = 5 * msecs_to_jiffies(sp->rtoinfo.srto_max); |
119 | 119 | ||
120 | ep->timeouts[SCTP_EVENT_TIMEOUT_HEARTBEAT] = | 120 | ep->timeouts[SCTP_EVENT_TIMEOUT_HEARTBEAT] = 0; |
121 | SCTP_DEFAULT_TIMEOUT_HEARTBEAT; | 121 | ep->timeouts[SCTP_EVENT_TIMEOUT_SACK] = sctp_sack_timeout; |
122 | ep->timeouts[SCTP_EVENT_TIMEOUT_SACK] = | 122 | ep->timeouts[SCTP_EVENT_TIMEOUT_AUTOCLOSE] = sp->autoclose * HZ; |
123 | SCTP_DEFAULT_TIMEOUT_SACK; | ||
124 | ep->timeouts[SCTP_EVENT_TIMEOUT_AUTOCLOSE] = | ||
125 | sp->autoclose * HZ; | ||
126 | 123 | ||
127 | /* Use SCTP specific send buffer space queues. */ | 124 | /* Use SCTP specific send buffer space queues. */ |
128 | ep->sndbuf_policy = sctp_sndbuf_policy; | 125 | ep->sndbuf_policy = sctp_sndbuf_policy; |
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 5135e1a25d25..e7f37faba7c0 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -1050,7 +1050,10 @@ SCTP_STATIC __init int sctp_init(void) | |||
1050 | sctp_sndbuf_policy = 0; | 1050 | sctp_sndbuf_policy = 0; |
1051 | 1051 | ||
1052 | /* HB.interval - 30 seconds */ | 1052 | /* HB.interval - 30 seconds */ |
1053 | sctp_hb_interval = 30 * HZ; | 1053 | sctp_hb_interval = SCTP_DEFAULT_TIMEOUT_HEARTBEAT; |
1054 | |||
1055 | /* delayed SACK timeout */ | ||
1056 | sctp_sack_timeout = SCTP_DEFAULT_TIMEOUT_SACK; | ||
1054 | 1057 | ||
1055 | /* Implementation specific variables. */ | 1058 | /* Implementation specific variables. */ |
1056 | 1059 | ||
diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c index 7fc31849312b..dc4893474f18 100644 --- a/net/sctp/sysctl.c +++ b/net/sctp/sysctl.c | |||
@@ -47,6 +47,8 @@ | |||
47 | static ctl_handler sctp_sysctl_jiffies_ms; | 47 | static ctl_handler sctp_sysctl_jiffies_ms; |
48 | static long rto_timer_min = 1; | 48 | static long rto_timer_min = 1; |
49 | static long rto_timer_max = 86400000; /* One day */ | 49 | static long rto_timer_max = 86400000; /* One day */ |
50 | static long sack_timer_min = 1; | ||
51 | static long sack_timer_max = 500; | ||
50 | 52 | ||
51 | static ctl_table sctp_table[] = { | 53 | static ctl_table sctp_table[] = { |
52 | { | 54 | { |
@@ -187,6 +189,17 @@ static ctl_table sctp_table[] = { | |||
187 | .mode = 0644, | 189 | .mode = 0644, |
188 | .proc_handler = &proc_dointvec | 190 | .proc_handler = &proc_dointvec |
189 | }, | 191 | }, |
192 | { | ||
193 | .ctl_name = NET_SCTP_SACK_TIMEOUT, | ||
194 | .procname = "sack_timeout", | ||
195 | .data = &sctp_sack_timeout, | ||
196 | .maxlen = sizeof(long), | ||
197 | .mode = 0644, | ||
198 | .proc_handler = &proc_doulongvec_ms_jiffies_minmax, | ||
199 | .strategy = &sctp_sysctl_jiffies_ms, | ||
200 | .extra1 = &sack_timer_min, | ||
201 | .extra2 = &sack_timer_max, | ||
202 | }, | ||
190 | { .ctl_name = 0 } | 203 | { .ctl_name = 0 } |
191 | }; | 204 | }; |
192 | 205 | ||
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 0ec0fde6e6c5..a63b69179607 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -103,7 +103,6 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer, | |||
103 | 103 | ||
104 | /* Set up the heartbeat timer. */ | 104 | /* Set up the heartbeat timer. */ |
105 | init_timer(&peer->hb_timer); | 105 | init_timer(&peer->hb_timer); |
106 | peer->hb_interval = SCTP_DEFAULT_TIMEOUT_HEARTBEAT; | ||
107 | peer->hb_timer.function = sctp_generate_heartbeat_event; | 106 | peer->hb_timer.function = sctp_generate_heartbeat_event; |
108 | peer->hb_timer.data = (unsigned long)peer; | 107 | peer->hb_timer.data = (unsigned long)peer; |
109 | 108 | ||