aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/8021q/vlanproc.c2
-rw-r--r--net/ax25/ax25_iface.c2
-rw-r--r--net/bridge/br_stp_if.c2
-rw-r--r--net/bridge/br_sysfs_br.c24
-rw-r--r--net/core/ethtool.c1
-rw-r--r--net/econet/af_econet.c3
-rw-r--r--net/ipv4/netfilter/nf_nat_sip.c2
-rw-r--r--net/ipv6/ipv6_sockglue.c2
-rw-r--r--net/mac80211/ieee80211.c1
-rw-r--r--net/mac80211/ieee80211_sta.c6
-rw-r--r--net/netfilter/nf_conntrack_sip.c8
-rw-r--r--net/netfilter/xt_u32.c2
-rw-r--r--net/socket.c2
13 files changed, 35 insertions, 22 deletions
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index c0040c9064a1..bd08aa090763 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -319,7 +319,7 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset)
319 static const char fmt[] = "%30s %12lu\n"; 319 static const char fmt[] = "%30s %12lu\n";
320 int i; 320 int i;
321 321
322 if ((vlandev == NULL) || (!(vlandev->priv_flags & IFF_802_1Q_VLAN))) 322 if (!(vlandev->priv_flags & IFF_802_1Q_VLAN))
323 return 0; 323 return 0;
324 324
325 seq_printf(seq, "%s VID: %d REORDER_HDR: %i dev->priv_flags: %hx\n", 325 seq_printf(seq, "%s VID: %d REORDER_HDR: %i dev->priv_flags: %hx\n",
diff --git a/net/ax25/ax25_iface.c b/net/ax25/ax25_iface.c
index 16be0c14780a..8443af57a374 100644
--- a/net/ax25/ax25_iface.c
+++ b/net/ax25/ax25_iface.c
@@ -69,7 +69,6 @@ void ax25_protocol_release(unsigned int pid)
69 if (protocol->pid == pid) { 69 if (protocol->pid == pid) {
70 protocol_list = protocol->next; 70 protocol_list = protocol->next;
71 write_unlock_bh(&protocol_list_lock); 71 write_unlock_bh(&protocol_list_lock);
72 kfree(protocol);
73 return; 72 return;
74 } 73 }
75 74
@@ -78,7 +77,6 @@ void ax25_protocol_release(unsigned int pid)
78 s = protocol->next; 77 s = protocol->next;
79 protocol->next = protocol->next->next; 78 protocol->next = protocol->next->next;
80 write_unlock_bh(&protocol_list_lock); 79 write_unlock_bh(&protocol_list_lock);
81 kfree(s);
82 return; 80 return;
83 } 81 }
84 82
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
index 1ea2f86f7683..1a430eccec9b 100644
--- a/net/bridge/br_stp_if.c
+++ b/net/bridge/br_stp_if.c
@@ -132,7 +132,7 @@ static void br_stp_start(struct net_bridge *br)
132 } else { 132 } else {
133 br->stp_enabled = BR_KERNEL_STP; 133 br->stp_enabled = BR_KERNEL_STP;
134 printk(KERN_INFO "%s: starting userspace STP failed, " 134 printk(KERN_INFO "%s: starting userspace STP failed, "
135 "staring kernel STP\n", br->dev->name); 135 "starting kernel STP\n", br->dev->name);
136 136
137 /* To start timers on any ports left in blocking */ 137 /* To start timers on any ports left in blocking */
138 spin_lock_bh(&br->lock); 138 spin_lock_bh(&br->lock);
diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c
index 4f42263e0a8a..88f43003b193 100644
--- a/net/bridge/br_sysfs_br.c
+++ b/net/bridge/br_sysfs_br.c
@@ -147,20 +147,26 @@ static ssize_t show_stp_state(struct device *d,
147 return sprintf(buf, "%d\n", br->stp_enabled); 147 return sprintf(buf, "%d\n", br->stp_enabled);
148} 148}
149 149
150static void set_stp_state(struct net_bridge *br, unsigned long val)
151{
152 rtnl_lock();
153 spin_unlock_bh(&br->lock);
154 br_stp_set_enabled(br, val);
155 spin_lock_bh(&br->lock);
156 rtnl_unlock();
157}
158 150
159static ssize_t store_stp_state(struct device *d, 151static ssize_t store_stp_state(struct device *d,
160 struct device_attribute *attr, const char *buf, 152 struct device_attribute *attr, const char *buf,
161 size_t len) 153 size_t len)
162{ 154{
163 return store_bridge_parm(d, buf, len, set_stp_state); 155 struct net_bridge *br = to_bridge(d);
156 char *endp;
157 unsigned long val;
158
159 if (!capable(CAP_NET_ADMIN))
160 return -EPERM;
161
162 val = simple_strtoul(buf, &endp, 0);
163 if (endp == buf)
164 return -EINVAL;
165
166 rtnl_lock();
167 br_stp_set_enabled(br, val);
168 rtnl_unlock();
169
164} 170}
165static DEVICE_ATTR(stp_state, S_IRUGO | S_IWUSR, show_stp_state, 171static DEVICE_ATTR(stp_state, S_IRUGO | S_IWUSR, show_stp_state,
166 store_stp_state); 172 store_stp_state);
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index 2ab0a60046a5..c5e059352d43 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -948,7 +948,6 @@ int dev_ethtool(struct ifreq *ifr)
948 return rc; 948 return rc;
949} 949}
950 950
951EXPORT_SYMBOL(dev_ethtool);
952EXPORT_SYMBOL(ethtool_op_get_link); 951EXPORT_SYMBOL(ethtool_op_get_link);
953EXPORT_SYMBOL(ethtool_op_get_sg); 952EXPORT_SYMBOL(ethtool_op_get_sg);
954EXPORT_SYMBOL(ethtool_op_get_tso); 953EXPORT_SYMBOL(ethtool_op_get_tso);
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index b5524f32ac2d..35c96bcc0f32 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -1146,6 +1146,9 @@ static void __exit econet_proto_exit(void)
1146 sock_release(udpsock); 1146 sock_release(udpsock);
1147#endif 1147#endif
1148 unregister_netdevice_notifier(&econet_netdev_notifier); 1148 unregister_netdevice_notifier(&econet_netdev_notifier);
1149#ifdef CONFIG_ECONET_NATIVE
1150 dev_remove_pack(&econet_packet_type);
1151#endif
1149 sock_unregister(econet_family_ops.family); 1152 sock_unregister(econet_family_ops.family);
1150 proto_unregister(&econet_proto); 1153 proto_unregister(&econet_proto);
1151} 1154}
diff --git a/net/ipv4/netfilter/nf_nat_sip.c b/net/ipv4/netfilter/nf_nat_sip.c
index a889ec3ec83a..e14d41976c27 100644
--- a/net/ipv4/netfilter/nf_nat_sip.c
+++ b/net/ipv4/netfilter/nf_nat_sip.c
@@ -104,7 +104,7 @@ static unsigned int ip_nat_sip(struct sk_buff **pskb,
104 dataoff = ip_hdrlen(*pskb) + sizeof(struct udphdr); 104 dataoff = ip_hdrlen(*pskb) + sizeof(struct udphdr);
105 datalen = (*pskb)->len - dataoff; 105 datalen = (*pskb)->len - dataoff;
106 if (datalen < sizeof("SIP/2.0") - 1) 106 if (datalen < sizeof("SIP/2.0") - 1)
107 return NF_DROP; 107 return NF_ACCEPT;
108 108
109 addr_map_init(ct, &map); 109 addr_map_init(ct, &map);
110 110
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index d6846393182d..761a910f4f97 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -820,7 +820,7 @@ static int ipv6_getsockopt_sticky(struct sock *sk, struct ipv6_txoptions *opt,
820 return 0; 820 return 0;
821 821
822 len = min_t(unsigned int, len, ipv6_optlen(hdr)); 822 len = min_t(unsigned int, len, ipv6_optlen(hdr));
823 if (copy_to_user(optval, hdr, len)); 823 if (copy_to_user(optval, hdr, len))
824 return -EFAULT; 824 return -EFAULT;
825 return ipv6_optlen(hdr); 825 return ipv6_optlen(hdr);
826} 826}
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index 8ec5ed192b5d..7286c389a4d0 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -4678,7 +4678,6 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb,
4678 memset(skb->cb, 0, sizeof(skb->cb)); 4678 memset(skb->cb, 0, sizeof(skb->cb));
4679 netif_rx(skb); 4679 netif_rx(skb);
4680 skb = skb2; 4680 skb = skb2;
4681 break;
4682 } 4681 }
4683 } 4682 }
4684 out: 4683 out:
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 7ba352e3ffe0..0d99b685df5f 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -2154,7 +2154,11 @@ static int ieee80211_sta_config_auth(struct net_device *dev,
2154 return 0; 2154 return 0;
2155 } else { 2155 } else {
2156 if (ifsta->state != IEEE80211_AUTHENTICATE) { 2156 if (ifsta->state != IEEE80211_AUTHENTICATE) {
2157 ieee80211_sta_start_scan(dev, NULL, 0); 2157 if (ifsta->auto_ssid_sel)
2158 ieee80211_sta_start_scan(dev, NULL, 0);
2159 else
2160 ieee80211_sta_start_scan(dev, ifsta->ssid,
2161 ifsta->ssid_len);
2158 ifsta->state = IEEE80211_AUTHENTICATE; 2162 ifsta->state = IEEE80211_AUTHENTICATE;
2159 set_bit(IEEE80211_STA_REQ_AUTH, &ifsta->request); 2163 set_bit(IEEE80211_STA_REQ_AUTH, &ifsta->request);
2160 } else 2164 } else
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c
index 1276a442f10c..d449fa47491c 100644
--- a/net/netfilter/nf_conntrack_sip.c
+++ b/net/netfilter/nf_conntrack_sip.c
@@ -295,6 +295,7 @@ static int epaddr_len(struct nf_conn *ct, const char *dptr,
295static int skp_epaddr_len(struct nf_conn *ct, const char *dptr, 295static int skp_epaddr_len(struct nf_conn *ct, const char *dptr,
296 const char *limit, int *shift) 296 const char *limit, int *shift)
297{ 297{
298 const char *start = dptr;
298 int s = *shift; 299 int s = *shift;
299 300
300 /* Search for @, but stop at the end of the line. 301 /* Search for @, but stop at the end of the line.
@@ -309,8 +310,10 @@ static int skp_epaddr_len(struct nf_conn *ct, const char *dptr,
309 if (dptr <= limit && *dptr == '@') { 310 if (dptr <= limit && *dptr == '@') {
310 dptr++; 311 dptr++;
311 (*shift)++; 312 (*shift)++;
312 } else 313 } else {
314 dptr = start;
313 *shift = s; 315 *shift = s;
316 }
314 317
315 return epaddr_len(ct, dptr, limit, shift); 318 return epaddr_len(ct, dptr, limit, shift);
316} 319}
@@ -330,7 +333,8 @@ int ct_sip_get_info(struct nf_conn *ct,
330 333
331 while (dptr <= limit) { 334 while (dptr <= limit) {
332 if ((strncmp(dptr, hnfo->lname, hnfo->lnlen) != 0) && 335 if ((strncmp(dptr, hnfo->lname, hnfo->lnlen) != 0) &&
333 (strncmp(dptr, hnfo->sname, hnfo->snlen) != 0)) { 336 (hnfo->sname == NULL ||
337 strncmp(dptr, hnfo->sname, hnfo->snlen) != 0)) {
334 dptr++; 338 dptr++;
335 continue; 339 continue;
336 } 340 }
diff --git a/net/netfilter/xt_u32.c b/net/netfilter/xt_u32.c
index 74f9b14c012f..bec427915b30 100644
--- a/net/netfilter/xt_u32.c
+++ b/net/netfilter/xt_u32.c
@@ -36,7 +36,7 @@ static bool u32_match_it(const struct xt_u32 *data,
36 at = 0; 36 at = 0;
37 pos = ct->location[0].number; 37 pos = ct->location[0].number;
38 38
39 if (skb->len < 4 || pos > skb->len - 4); 39 if (skb->len < 4 || pos > skb->len - 4)
40 return false; 40 return false;
41 41
42 ret = skb_copy_bits(skb, pos, &n, sizeof(n)); 42 ret = skb_copy_bits(skb, pos, &n, sizeof(n));
diff --git a/net/socket.c b/net/socket.c
index ec077037f534..7d44453dfae1 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -1168,7 +1168,7 @@ static int __sock_create(int family, int type, int protocol,
1168 module_put(pf->owner); 1168 module_put(pf->owner);
1169 err = security_socket_post_create(sock, family, type, protocol, kern); 1169 err = security_socket_post_create(sock, family, type, protocol, kern);
1170 if (err) 1170 if (err)
1171 goto out_release; 1171 goto out_sock_release;
1172 *res = sock; 1172 *res = sock;
1173 1173
1174 return 0; 1174 return 0;