Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  [IPV4]: Fix ip command line processing.
  [VETH]: move veth.h to include/linux
  [NET] tc_nat: header install
  [TUNTAP]: Fix wrong debug message.
  [NETFILTER]: nf_conntrack_ipv4: fix module parameter compatibility
  mac80211: warn when receiving frames with unaligned data
  mac80211: round station cleanup timer
  • Loading branch information
Linus Torvalds committed Dec 27, 2007
2 parents b50fd73 + a6c05c3 commit c68cb23
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 16 deletions.
5 changes: 1 addition & 4 deletions Documentation/nfsroot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
autoconfiguration will take place. The most common way to use this
is "ip=dhcp".

Note that "ip=off" is not the same thing as "ip=::::::off", because in
the latter autoconfiguration will take place if any of DHCP, BOOTP or RARP
are compiled in the kernel.

<client-ip> IP address of the client.

Default: Determined using autoconfiguration.
Expand Down Expand Up @@ -150,6 +146,7 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>

off or none: don't use autoconfiguration
on or any: use any protocol available in the kernel
(default)
dhcp: use DHCP
bootp: use BOOTP
rarp: use RARP
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ static int tun_chr_ioctl(struct inode *inode, struct file *file,
tun->flags &= ~TUN_PERSIST;

DBG(KERN_INFO "%s: persist %s\n",
tun->dev->name, arg ? "disabled" : "enabled");
tun->dev->name, arg ? "enabled" : "disabled");
break;

case TUNSETOWNER:
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/veth.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include <net/dst.h>
#include <net/xfrm.h>
#include <net/veth.h>
#include <linux/veth.h>

#define DRV_NAME "veth"
#define DRV_VERSION "1.0"
Expand Down
1 change: 1 addition & 0 deletions include/linux/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ header-y += toshiba.h
header-y += ultrasound.h
header-y += un.h
header-y += utime.h
header-y += veth.h
header-y += video_decoder.h
header-y += video_encoder.h
header-y += videotext.h
Expand Down
1 change: 1 addition & 0 deletions include/linux/tc_act/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ header-y += tc_gact.h
header-y += tc_ipt.h
header-y += tc_mirred.h
header-y += tc_pedit.h
header-y += tc_nat.h
File renamed without changes.
1 change: 1 addition & 0 deletions include/net/netfilter/nf_conntrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ static inline int nf_ct_is_untracked(const struct sk_buff *skb)
return (skb->nfct == &nf_conntrack_untracked.ct_general);
}

extern int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp);
extern unsigned int nf_conntrack_htable_size;
extern int nf_conntrack_checksum;
extern atomic_t nf_conntrack_count;
Expand Down
10 changes: 4 additions & 6 deletions net/ipv4/ipconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -1403,6 +1403,10 @@ static int __init ic_proto_name(char *name)
if (!strcmp(name, "on") || !strcmp(name, "any")) {
return 1;
}
if (!strcmp(name, "off") || !strcmp(name, "none")) {
ic_enable = 0;
return 1;
}
#ifdef CONFIG_IP_PNP_DHCP
else if (!strcmp(name, "dhcp")) {
ic_proto_enabled &= ~IC_RARP;
Expand Down Expand Up @@ -1437,12 +1441,6 @@ static int __init ip_auto_config_setup(char *addrs)

ic_set_manually = 1;

ic_enable = (*addrs &&
(strcmp(addrs, "off") != 0) &&
(strcmp(addrs, "none") != 0));
if (!ic_enable)
return 1;

if (ic_proto_name(addrs))
return 1;

Expand Down
3 changes: 3 additions & 0 deletions net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,9 @@ struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4 __read_mostly = {
.me = THIS_MODULE,
};

module_param_call(hashsize, nf_conntrack_set_hashsize, param_get_uint,
&nf_conntrack_htable_size, 0600);

MODULE_ALIAS("nf_conntrack-" __stringify(AF_INET));
MODULE_ALIAS("ip_conntrack");
MODULE_LICENSE("GPL");
Expand Down
13 changes: 13 additions & 0 deletions net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,7 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb,
struct ieee80211_sub_if_data *prev = NULL;
struct sk_buff *skb_new;
u8 *bssid;
int hdrlen;

/*
* key references and virtual interfaces are protected using RCU
Expand Down Expand Up @@ -1472,6 +1473,18 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb,
rx.fc = le16_to_cpu(hdr->frame_control);
type = rx.fc & IEEE80211_FCTL_FTYPE;

/*
* Drivers are required to align the payload data to a four-byte
* boundary, so the last two bits of the address where it starts
* may not be set. The header is required to be directly before
* the payload data, padding like atheros hardware adds which is
* inbetween the 802.11 header and the payload is not supported,
* the driver is required to move the 802.11 header further back
* in that case.
*/
hdrlen = ieee80211_get_hdrlen(rx.fc);
WARN_ON_ONCE(((unsigned long)(skb->data + hdrlen)) & 3);

if (type == IEEE80211_FTYPE_DATA || type == IEEE80211_FTYPE_MGMT)
local->dot11ReceivedFragmentCount++;

Expand Down
7 changes: 5 additions & 2 deletions net/mac80211/sta_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/slab.h>
#include <linux/skbuff.h>
#include <linux/if_arp.h>
#include <linux/timer.h>

#include <net/mac80211.h>
#include "ieee80211_i.h"
Expand Down Expand Up @@ -306,7 +307,8 @@ static void sta_info_cleanup(unsigned long data)
}
read_unlock_bh(&local->sta_lock);

local->sta_cleanup.expires = jiffies + STA_INFO_CLEANUP_INTERVAL;
local->sta_cleanup.expires =
round_jiffies(jiffies + STA_INFO_CLEANUP_INTERVAL);
add_timer(&local->sta_cleanup);
}

Expand Down Expand Up @@ -345,7 +347,8 @@ void sta_info_init(struct ieee80211_local *local)
INIT_LIST_HEAD(&local->sta_list);

init_timer(&local->sta_cleanup);
local->sta_cleanup.expires = jiffies + STA_INFO_CLEANUP_INTERVAL;
local->sta_cleanup.expires =
round_jiffies(jiffies + STA_INFO_CLEANUP_INTERVAL);
local->sta_cleanup.data = (unsigned long) local;
local->sta_cleanup.function = sta_info_cleanup;

Expand Down
5 changes: 3 additions & 2 deletions net/netfilter/nf_conntrack_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ struct hlist_head *nf_ct_alloc_hashtable(int *sizep, int *vmalloced)
}
EXPORT_SYMBOL_GPL(nf_ct_alloc_hashtable);

int set_hashsize(const char *val, struct kernel_param *kp)
int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp)
{
int i, bucket, hashsize, vmalloced;
int old_vmalloced, old_size;
Expand Down Expand Up @@ -1063,8 +1063,9 @@ int set_hashsize(const char *val, struct kernel_param *kp)
nf_ct_free_hashtable(old_hash, old_vmalloced, old_size);
return 0;
}
EXPORT_SYMBOL_GPL(nf_conntrack_set_hashsize);

module_param_call(hashsize, set_hashsize, param_get_uint,
module_param_call(hashsize, nf_conntrack_set_hashsize, param_get_uint,
&nf_conntrack_htable_size, 0600);

int __init nf_conntrack_init(void)
Expand Down

0 comments on commit c68cb23

Please sign in to comment.