Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86473
b: refs/heads/master
c: 5b0acc6
h: refs/heads/master
i:
  86471: 49e76fd
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Feb 28, 2008
1 parent f77074d commit eb9ff64
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 61 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fbabbed8284d1526ed01754ecd4fabdb941a1ff2
refs/heads/master: 5b0acc64a3750f8f017b973f1059bb25b791c2a3
14 changes: 7 additions & 7 deletions trunk/drivers/net/wireless/rndis_wlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@ struct NDIS_WLAN_BSSID_EX {
struct NDIS_802_11_SSID Ssid;
__le32 Privacy;
__le32 Rssi;
enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
__le32 NetworkTypeInUse;
struct NDIS_802_11_CONFIGURATION Configuration;
enum NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
__le32 InfrastructureMode;
u8 SupportedRates[NDIS_802_11_LENGTH_RATES_EX];
__le32 IELength;
u8 IEs[0];
Expand Down Expand Up @@ -279,11 +279,11 @@ struct RNDIS_CONFIG_PARAMETER_INFOBUFFER {
} __attribute__((packed));

/* these have to match what is in wpa_supplicant */
enum { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP } wpa_alg;
enum { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP, CIPHER_WEP104 }
wpa_cipher;
enum { KEY_MGMT_802_1X, KEY_MGMT_PSK, KEY_MGMT_NONE, KEY_MGMT_802_1X_NO_WPA,
KEY_MGMT_WPA_NONE } wpa_key_mgmt;
enum wpa_alg { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP };
enum wpa_cipher { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP,
CIPHER_WEP104 };
enum wpa_key_mgmt { KEY_MGMT_802_1X, KEY_MGMT_PSK, KEY_MGMT_NONE,
KEY_MGMT_802_1X_NO_WPA, KEY_MGMT_WPA_NONE };

/*
* private data
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/netfilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#define NF_VERDICT_QMASK 0xffff0000
#define NF_VERDICT_QBITS 16

#define NF_QUEUE_NR(x) ((((x) << NF_VERDICT_BITS) & NF_VERDICT_QMASK) | NF_QUEUE)
#define NF_QUEUE_NR(x) (((x << NF_VERDICT_QBITS) & NF_VERDICT_QMASK) | NF_QUEUE)

/* only for userspace compatibility */
#ifndef __KERNEL__
Expand Down
14 changes: 5 additions & 9 deletions trunk/net/ipv4/ip_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,24 +266,20 @@ static struct ip_tunnel * ipgre_tunnel_locate(struct ip_tunnel_parm *parms, int
if (!dev)
return NULL;

if (strchr(name, '%')) {
if (dev_alloc_name(dev, name) < 0)
goto failed_free;
}

dev->init = ipgre_tunnel_init;
nt = netdev_priv(dev);
nt->parms = *parms;

if (register_netdevice(dev) < 0)
goto failed_free;
if (register_netdevice(dev) < 0) {
free_netdev(dev);
goto failed;
}

dev_hold(dev);
ipgre_tunnel_link(nt);
return nt;

failed_free:
free_netdev(dev);
failed:
return NULL;
}

Expand Down
14 changes: 5 additions & 9 deletions trunk/net/ipv4/ipip.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,24 +228,20 @@ static struct ip_tunnel * ipip_tunnel_locate(struct ip_tunnel_parm *parms, int c
if (dev == NULL)
return NULL;

if (strchr(name, '%')) {
if (dev_alloc_name(dev, name) < 0)
goto failed_free;
}

nt = netdev_priv(dev);
dev->init = ipip_tunnel_init;
nt->parms = *parms;

if (register_netdevice(dev) < 0)
goto failed_free;
if (register_netdevice(dev) < 0) {
free_netdev(dev);
goto failed;
}

dev_hold(dev);
ipip_tunnel_link(nt);
return nt;

failed_free:
free_netdev(dev);
failed:
return NULL;
}

Expand Down
15 changes: 4 additions & 11 deletions trunk/net/ipv6/ip6_tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,24 +238,17 @@ static struct ip6_tnl *ip6_tnl_create(struct ip6_tnl_parm *p)
if (dev == NULL)
goto failed;

if (strchr(name, '%')) {
if (dev_alloc_name(dev, name) < 0)
goto failed_free;
}

t = netdev_priv(dev);
dev->init = ip6_tnl_dev_init;
t->parms = *p;

if ((err = register_netdevice(dev)) < 0)
goto failed_free;

if ((err = register_netdevice(dev)) < 0) {
free_netdev(dev);
goto failed;
}
dev_hold(dev);
ip6_tnl_link(t);
return t;

failed_free:
free_netdev(dev);
failed:
return NULL;
}
Expand Down
13 changes: 4 additions & 9 deletions trunk/net/ipv6/sit.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,28 +171,23 @@ static struct ip_tunnel * ipip6_tunnel_locate(struct ip_tunnel_parm *parms, int
if (dev == NULL)
return NULL;

if (strchr(name, '%')) {
if (dev_alloc_name(dev, name) < 0)
goto failed_free;
}

nt = netdev_priv(dev);
dev->init = ipip6_tunnel_init;
nt->parms = *parms;

if (parms->i_flags & SIT_ISATAP)
dev->priv_flags |= IFF_ISATAP;

if (register_netdevice(dev) < 0)
goto failed_free;
if (register_netdevice(dev) < 0) {
free_netdev(dev);
goto failed;
}

dev_hold(dev);

ipip6_tunnel_link(nt);
return nt;

failed_free:
free_netdev(dev);
failed:
return NULL;
}
Expand Down
3 changes: 3 additions & 0 deletions trunk/net/ipv6/sysctl_net_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ static int ipv6_sysctl_net_init(struct net *net)

net->ipv6.sysctl.table = register_net_sysctl_table(net, net_ipv6_ctl_path,
ipv6_table);
if (!net->ipv6.sysctl.table)
return -ENOMEM;

if (!net->ipv6.sysctl.table)
goto out_ipv6_icmp_table;

Expand Down
15 changes: 3 additions & 12 deletions trunk/net/netfilter/nf_conntrack_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,19 +256,13 @@ __nf_conntrack_find(const struct nf_conntrack_tuple *tuple)
struct hlist_node *n;
unsigned int hash = hash_conntrack(tuple);

/* Disable BHs the entire time since we normally need to disable them
* at least once for the stats anyway.
*/
local_bh_disable();
hlist_for_each_entry_rcu(h, n, &nf_conntrack_hash[hash], hnode) {
if (nf_ct_tuple_equal(tuple, &h->tuple)) {
NF_CT_STAT_INC(found);
local_bh_enable();
return h;
}
NF_CT_STAT_INC(searched);
}
local_bh_enable();

return NULL;
}
Expand Down Expand Up @@ -406,20 +400,17 @@ nf_conntrack_tuple_taken(const struct nf_conntrack_tuple *tuple,
struct hlist_node *n;
unsigned int hash = hash_conntrack(tuple);

/* Disable BHs the entire time since we need to disable them at
* least once for the stats anyway.
*/
rcu_read_lock_bh();
rcu_read_lock();
hlist_for_each_entry_rcu(h, n, &nf_conntrack_hash[hash], hnode) {
if (nf_ct_tuplehash_to_ctrack(h) != ignored_conntrack &&
nf_ct_tuple_equal(tuple, &h->tuple)) {
NF_CT_STAT_INC(found);
rcu_read_unlock_bh();
rcu_read_unlock();
return 1;
}
NF_CT_STAT_INC(searched);
}
rcu_read_unlock_bh();
rcu_read_unlock();

return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/netfilter/xt_conntrack.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ conntrack_addrcmp(const union nf_inet_addr *kaddr,
const union nf_inet_addr *umask, unsigned int l3proto)
{
if (l3proto == AF_INET)
return ((kaddr->ip ^ uaddr->ip) & umask->ip) == 0;
return (kaddr->ip & umask->ip) == uaddr->ip;
else if (l3proto == AF_INET6)
return ipv6_masked_addr_cmp(&kaddr->in6, &umask->in6,
&uaddr->in6) == 0;
Expand Down Expand Up @@ -231,7 +231,7 @@ conntrack_mt(const struct sk_buff *skb, const struct net_device *in,
if (test_bit(IPS_DST_NAT_BIT, &ct->status))
statebit |= XT_CONNTRACK_STATE_DNAT;
}
if (!!(info->state_mask & statebit) ^
if ((info->state_mask & statebit) ^
!(info->invert_flags & XT_CONNTRACK_STATE))
return false;
}
Expand Down

0 comments on commit eb9ff64

Please sign in to comment.