Commit 8f8495e9 authored by David S. Miller's avatar David S. Miller

Merge bk://kernel.bkbits.net/acme/net-2.5

into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents c2f15366 0438a0e2
...@@ -252,9 +252,7 @@ static int dst_dev_event(struct notifier_block *this, unsigned long event, void ...@@ -252,9 +252,7 @@ static int dst_dev_event(struct notifier_block *this, unsigned long event, void
} }
struct notifier_block dst_dev_notifier = { struct notifier_block dst_dev_notifier = {
dst_dev_event, .notifier_call = dst_dev_event,
NULL,
0
}; };
void __init dst_init(void) void __init dst_init(void)
......
...@@ -30,8 +30,8 @@ enum lw_bits { ...@@ -30,8 +30,8 @@ enum lw_bits {
LW_SE_USED LW_SE_USED
}; };
static unsigned long linkwatch_flags = 0; static unsigned long linkwatch_flags;
static unsigned long linkwatch_nextevent = 0; static unsigned long linkwatch_nextevent;
static void linkwatch_event(void *dummy); static void linkwatch_event(void *dummy);
static DECLARE_WORK(linkwatch_work, linkwatch_event, NULL); static DECLARE_WORK(linkwatch_work, linkwatch_event, NULL);
......
...@@ -1473,141 +1473,141 @@ struct neigh_sysctl_table { ...@@ -1473,141 +1473,141 @@ struct neigh_sysctl_table {
} neigh_sysctl_template = { } neigh_sysctl_template = {
.neigh_vars = { .neigh_vars = {
{ {
.ctl_name = NET_NEIGH_MCAST_SOLICIT, .ctl_name = NET_NEIGH_MCAST_SOLICIT,
.procname = "mcast_solicit", .procname = "mcast_solicit",
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_NEIGH_UCAST_SOLICIT, .ctl_name = NET_NEIGH_UCAST_SOLICIT,
.procname = "ucast_solicit", .procname = "ucast_solicit",
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_NEIGH_APP_SOLICIT, .ctl_name = NET_NEIGH_APP_SOLICIT,
.procname = "app_solicit", .procname = "app_solicit",
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_NEIGH_RETRANS_TIME, .ctl_name = NET_NEIGH_RETRANS_TIME,
.procname = "retrans_time", .procname = "retrans_time",
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_NEIGH_REACHABLE_TIME, .ctl_name = NET_NEIGH_REACHABLE_TIME,
.procname = "base_reachable_time", .procname = "base_reachable_time",
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
}, },
{ {
.ctl_name = NET_NEIGH_DELAY_PROBE_TIME, .ctl_name = NET_NEIGH_DELAY_PROBE_TIME,
.procname = "delay_first_probe_time", .procname = "delay_first_probe_time",
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
}, },
{ {
.ctl_name = NET_NEIGH_GC_STALE_TIME, .ctl_name = NET_NEIGH_GC_STALE_TIME,
.procname = "gc_stale_time", .procname = "gc_stale_time",
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
}, },
{ {
.ctl_name = NET_NEIGH_UNRES_QLEN, .ctl_name = NET_NEIGH_UNRES_QLEN,
.procname = "unres_qlen", .procname = "unres_qlen",
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_NEIGH_PROXY_QLEN, .ctl_name = NET_NEIGH_PROXY_QLEN,
.procname = "proxy_qlen", .procname = "proxy_qlen",
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_NEIGH_ANYCAST_DELAY, .ctl_name = NET_NEIGH_ANYCAST_DELAY,
.procname = "anycast_delay", .procname = "anycast_delay",
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_NEIGH_PROXY_DELAY, .ctl_name = NET_NEIGH_PROXY_DELAY,
.procname = "proxy_delay", .procname = "proxy_delay",
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_NEIGH_LOCKTIME, .ctl_name = NET_NEIGH_LOCKTIME,
.procname = "locktime", .procname = "locktime",
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_NEIGH_GC_INTERVAL, .ctl_name = NET_NEIGH_GC_INTERVAL,
.procname = "gc_interval", .procname = "gc_interval",
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
}, },
{ {
.ctl_name = NET_NEIGH_GC_THRESH1, .ctl_name = NET_NEIGH_GC_THRESH1,
.procname = "gc_thresh1", .procname = "gc_thresh1",
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_NEIGH_GC_THRESH2, .ctl_name = NET_NEIGH_GC_THRESH2,
.procname = "gc_thresh2", .procname = "gc_thresh2",
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_NEIGH_GC_THRESH3, .ctl_name = NET_NEIGH_GC_THRESH3,
.procname = "gc_thresh3", .procname = "gc_thresh3",
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
}, },
.neigh_dev = { .neigh_dev = {
{ {
.ctl_name = NET_PROTO_CONF_DEFAULT, .ctl_name = NET_PROTO_CONF_DEFAULT,
.procname = "default", .procname = "default",
.mode = 0555, .mode = 0555,
}, },
}, },
.neigh_neigh_dir = { .neigh_neigh_dir = {
{ {
.procname = "neigh", .procname = "neigh",
.mode = 0555, .mode = 0555,
}, },
}, },
.neigh_proto_dir = { .neigh_proto_dir = {
{ {
.mode = 0555, .mode = 0555,
}, },
}, },
.neigh_root_dir = { .neigh_root_dir = {
{ {
.ctl_name = CTL_NET, .ctl_name = CTL_NET,
.procname = "net", .procname = "net",
.mode = 0555, .mode = 0555,
}, },
}, },
}; };
......
...@@ -198,8 +198,8 @@ static int debug; ...@@ -198,8 +198,8 @@ static int debug;
/* Module parameters, defaults. */ /* Module parameters, defaults. */
static int count_d = 100000; static int count_d = 100000;
static int ipg_d = 0; static int ipg_d;
static int clone_skb_d = 0; static int clone_skb_d;
#define MAX_PKTGEN 8 #define MAX_PKTGEN 8
...@@ -220,7 +220,7 @@ static inline __u64 getCurMs(void) { ...@@ -220,7 +220,7 @@ static inline __u64 getCurMs(void) {
} }
#define PG_PROC_DIR "pktgen" #define PG_PROC_DIR "pktgen"
static struct proc_dir_entry *proc_dir = 0; static struct proc_dir_entry *proc_dir;
static struct net_device *setup_inject(struct pktgen_info* info) static struct net_device *setup_inject(struct pktgen_info* info)
{ {
......
...@@ -160,7 +160,9 @@ static struct timer_list whitehole_timer = ...@@ -160,7 +160,9 @@ static struct timer_list whitehole_timer =
TIMER_INITIALIZER(whitehole_inject, 0, 0); TIMER_INITIALIZER(whitehole_inject, 0, 0);
static struct net_device whitehole_dev = { static struct net_device whitehole_dev = {
"whitehole", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NULL, whitehole_init, }; .name = "whitehole",
.init = whitehole_init,
};
static int whitehole_open(struct net_device *dev) static int whitehole_open(struct net_device *dev)
{ {
......
...@@ -469,24 +469,21 @@ static void dn_destruct(struct sock *sk) ...@@ -469,24 +469,21 @@ static void dn_destruct(struct sock *sk)
skb_queue_purge(&scp->other_receive_queue); skb_queue_purge(&scp->other_receive_queue);
dst_release(xchg(&sk->dst_cache, NULL)); dst_release(xchg(&sk->dst_cache, NULL));
MOD_DEC_USE_COUNT;
} }
struct sock *dn_alloc_sock(struct socket *sock, int gfp) struct sock *dn_alloc_sock(struct socket *sock, int gfp)
{ {
struct sock *sk;
struct dn_scp *scp; struct dn_scp *scp;
struct sock *sk = sk_alloc(PF_DECnet, gfp, sizeof(struct dn_sock),
dn_sk_cachep);
if ((sk = sk_alloc(PF_DECnet, gfp, sizeof(struct dn_sock), dn_sk_cachep)) == NULL) if (!sk)
goto no_sock; goto out;
scp = (struct dn_scp *)(sk + 1); DN_SK(sk) = scp = (struct dn_scp *)(sk + 1);
DN_SK(sk) = scp;
if (sock) { if (sock)
sock->ops = &dn_proto_ops; sock->ops = &dn_proto_ops;
}
sock_init_data(sock, sk); sock_init_data(sock, sk);
sk->backlog_rcv = dn_nsp_backlog_rcv; sk->backlog_rcv = dn_nsp_backlog_rcv;
...@@ -543,13 +540,8 @@ struct sock *dn_alloc_sock(struct socket *sock, int gfp) ...@@ -543,13 +540,8 @@ struct sock *dn_alloc_sock(struct socket *sock, int gfp)
scp->delack_fxn = dn_nsp_delayed_ack; scp->delack_fxn = dn_nsp_delayed_ack;
dn_start_slow_timer(sk); dn_start_slow_timer(sk);
out:
MOD_INC_USE_COUNT;
return sk; return sk;
no_sock:
return NULL;
} }
/* /*
...@@ -2238,6 +2230,7 @@ static int dn_get_info(char *buffer, char **start, off_t offset, int length) ...@@ -2238,6 +2230,7 @@ static int dn_get_info(char *buffer, char **start, off_t offset, int length)
static struct net_proto_family dn_family_ops = { static struct net_proto_family dn_family_ops = {
.family = AF_DECnet, .family = AF_DECnet,
.create = dn_create, .create = dn_create,
.owner = THIS_MODULE,
}; };
static struct proto_ops dn_proto_ops = { static struct proto_ops dn_proto_ops = {
...@@ -2304,7 +2297,7 @@ static int __init decnet_init(void) ...@@ -2304,7 +2297,7 @@ static int __init decnet_init(void)
* Requires an audit of the code to check for memory leaks and * Requires an audit of the code to check for memory leaks and
* initialisation problems etc. * initialisation problems etc.
*/ */
MOD_INC_USE_COUNT; try_module_get(THIS_MODULE);
return 0; return 0;
......
...@@ -83,23 +83,62 @@ static struct ...@@ -83,23 +83,62 @@ static struct
{ {
int error; int error;
u8 scope; u8 scope;
} fib_props[RTA_MAX+1] = { } fib_props[RTA_MAX + 1] = {
{ 0, RT_SCOPE_NOWHERE}, /* RTN_UNSPEC */ {
{ 0, RT_SCOPE_UNIVERSE}, /* RTN_UNICAST */ .error = 0,
{ 0, RT_SCOPE_HOST}, /* RTN_LOCAL */ .scope = RT_SCOPE_NOWHERE,
{ 0, RT_SCOPE_LINK}, /* RTN_BROADCAST */ }, /* RTN_UNSPEC */
{ 0, RT_SCOPE_LINK}, /* RTN_ANYCAST */ {
{ 0, RT_SCOPE_UNIVERSE}, /* RTN_MULTICAST */ .error = 0,
{ -EINVAL, RT_SCOPE_UNIVERSE}, /* RTN_BLACKHOLE */ .scope = RT_SCOPE_UNIVERSE,
{ -EHOSTUNREACH, RT_SCOPE_UNIVERSE},/* RTN_UNREACHABLE */ }, /* RTN_UNICAST */
{ -EACCES, RT_SCOPE_UNIVERSE}, /* RTN_PROHIBIT */ {
{ -EAGAIN, RT_SCOPE_UNIVERSE}, /* RTN_THROW */ .error = 0,
.scope = RT_SCOPE_HOST,
}, /* RTN_LOCAL */
{
.error = 0,
.scope = RT_SCOPE_LINK,
}, /* RTN_BROADCAST */
{
.error = 0,
.scope = RT_SCOPE_LINK,
}, /* RTN_ANYCAST */
{
.error = 0,
.scope = RT_SCOPE_UNIVERSE,
}, /* RTN_MULTICAST */
{
.error = -EINVAL,
.scope = RT_SCOPE_UNIVERSE,
}, /* RTN_BLACKHOLE */
{
.error = -EHOSTUNREACH,
.scope = RT_SCOPE_UNIVERSE,
}, /* RTN_UNREACHABLE */
{
.error = -EACCES,
.scope = RT_SCOPE_UNIVERSE,
}, /* RTN_PROHIBIT */
{
.error = -EAGAIN,
.scope = RT_SCOPE_UNIVERSE,
}, /* RTN_THROW */
#ifdef CONFIG_IP_ROUTE_NAT #ifdef CONFIG_IP_ROUTE_NAT
{ 0, RT_SCOPE_HOST}, /* RTN_NAT */ {
.error = 0,
.scope = RT_SCOPE_HOST,
}, /* RTN_NAT */
#else #else
{ -EINVAL, RT_SCOPE_NOWHERE}, /* RTN_NAT */ {
.error = -EINVAL,
.scope = RT_SCOPE_NOWHERE,
}, /* RTN_NAT */
#endif #endif
{ -EINVAL, RT_SCOPE_NOWHERE} /* RTN_XRESOLVE */ {
.error = -EINVAL,
.scope = RT_SCOPE_NOWHERE,
}, /* RTN_XRESOLVE */
}; };
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
* Shall we try to damage output packets if routing dev changes? * Shall we try to damage output packets if routing dev changes?
*/ */
int sysctl_ip_dynaddr = 0; int sysctl_ip_dynaddr;
int sysctl_ip_default_ttl = IPDEFTTL; int sysctl_ip_default_ttl = IPDEFTTL;
/* Generate a checksum for an outgoing IP datagram. */ /* Generate a checksum for an outgoing IP datagram. */
......
...@@ -78,16 +78,16 @@ int sysctl_tcp_reordering = TCP_FASTRETRANS_THRESH; ...@@ -78,16 +78,16 @@ int sysctl_tcp_reordering = TCP_FASTRETRANS_THRESH;
#ifdef CONFIG_INET_ECN #ifdef CONFIG_INET_ECN
int sysctl_tcp_ecn = 1; int sysctl_tcp_ecn = 1;
#else #else
int sysctl_tcp_ecn = 0; int sysctl_tcp_ecn;
#endif #endif
int sysctl_tcp_dsack = 1; int sysctl_tcp_dsack = 1;
int sysctl_tcp_app_win = 31; int sysctl_tcp_app_win = 31;
int sysctl_tcp_adv_win_scale = 2; int sysctl_tcp_adv_win_scale = 2;
int sysctl_tcp_stdurg = 0; int sysctl_tcp_stdurg;
int sysctl_tcp_rfc1337 = 0; int sysctl_tcp_rfc1337;
int sysctl_tcp_max_orphans = NR_FILE; int sysctl_tcp_max_orphans = NR_FILE;
int sysctl_tcp_frto = 0; int sysctl_tcp_frto;
#define FLAG_DATA 0x01 /* Incoming frame contained data. */ #define FLAG_DATA 0x01 /* Incoming frame contained data. */
#define FLAG_WIN_UPDATE 0x02 /* Incoming ACK was a window update. */ #define FLAG_WIN_UPDATE 0x02 /* Incoming ACK was a window update. */
......
...@@ -33,11 +33,11 @@ ...@@ -33,11 +33,11 @@
#define SYNC_INIT 1 #define SYNC_INIT 1
#endif #endif
int sysctl_tcp_tw_recycle = 0; int sysctl_tcp_tw_recycle;
int sysctl_tcp_max_tw_buckets = NR_FILE*2; int sysctl_tcp_max_tw_buckets = NR_FILE*2;
int sysctl_tcp_syncookies = SYNC_INIT; int sysctl_tcp_syncookies = SYNC_INIT;
int sysctl_tcp_abort_on_overflow = 0; int sysctl_tcp_abort_on_overflow;
static __inline__ int tcp_in_window(u32 seq, u32 end_seq, u32 s_win, u32 e_win) static __inline__ int tcp_in_window(u32 seq, u32 end_seq, u32 s_win, u32 e_win)
{ {
...@@ -50,7 +50,7 @@ static __inline__ int tcp_in_window(u32 seq, u32 end_seq, u32 s_win, u32 e_win) ...@@ -50,7 +50,7 @@ static __inline__ int tcp_in_window(u32 seq, u32 end_seq, u32 s_win, u32 e_win)
/* New-style handling of TIME_WAIT sockets. */ /* New-style handling of TIME_WAIT sockets. */
int tcp_tw_count = 0; int tcp_tw_count;
/* Must be called with locally disabled BHs. */ /* Must be called with locally disabled BHs. */
......
...@@ -132,45 +132,43 @@ static int ipv6_chk_same_addr(const struct in6_addr *addr, struct net_device *de ...@@ -132,45 +132,43 @@ static int ipv6_chk_same_addr(const struct in6_addr *addr, struct net_device *de
static struct notifier_block *inet6addr_chain; static struct notifier_block *inet6addr_chain;
struct ipv6_devconf ipv6_devconf = struct ipv6_devconf ipv6_devconf = {
{ .forwarding = 0,
0, /* forwarding */ .hop_limit = IPV6_DEFAULT_HOPLIMIT,
IPV6_DEFAULT_HOPLIMIT, /* hop limit */ .mtu6 = IPV6_MIN_MTU,
IPV6_MIN_MTU, /* mtu */ .accept_ra = 1,
1, /* accept RAs */ .accept_redirects = 1,
1, /* accept redirects */ .autoconf = 1,
1, /* autoconfiguration */ .dad_transmits = 1,
1, /* dad transmits */ .rtr_solicits = MAX_RTR_SOLICITATIONS,
MAX_RTR_SOLICITATIONS, /* router solicits */ .rtr_solicit_interval = RTR_SOLICITATION_INTERVAL,
RTR_SOLICITATION_INTERVAL, /* rtr solicit interval */ .rtr_solicit_delay = MAX_RTR_SOLICITATION_DELAY,
MAX_RTR_SOLICITATION_DELAY, /* rtr solicit delay */
#ifdef CONFIG_IPV6_PRIVACY #ifdef CONFIG_IPV6_PRIVACY
.use_tempaddr = 0, .use_tempaddr = 0,
.temp_valid_lft = TEMP_VALID_LIFETIME, .temp_valid_lft = TEMP_VALID_LIFETIME,
.temp_prefered_lft = TEMP_PREFERRED_LIFETIME, .temp_prefered_lft = TEMP_PREFERRED_LIFETIME,
.regen_max_retry = REGEN_MAX_RETRY, .regen_max_retry = REGEN_MAX_RETRY,
.max_desync_factor = MAX_DESYNC_FACTOR, .max_desync_factor = MAX_DESYNC_FACTOR,
#endif #endif
}; };
static struct ipv6_devconf ipv6_devconf_dflt = static struct ipv6_devconf ipv6_devconf_dflt = {
{ .forwarding = 0,
0, /* forwarding */ .hop_limit = IPV6_DEFAULT_HOPLIMIT,
IPV6_DEFAULT_HOPLIMIT, /* hop limit */ .mtu6 = IPV6_MIN_MTU,
IPV6_MIN_MTU, /* mtu */ .accept_ra = 1,
1, /* accept RAs */ .accept_redirects = 1,
1, /* accept redirects */ .autoconf = 1,
1, /* autoconfiguration */ .dad_transmits = 1,
1, /* dad transmits */ .rtr_solicits = MAX_RTR_SOLICITATIONS,
MAX_RTR_SOLICITATIONS, /* router solicits */ .rtr_solicit_interval = RTR_SOLICITATION_INTERVAL,
RTR_SOLICITATION_INTERVAL, /* rtr solicit interval */ .rtr_solicit_delay = MAX_RTR_SOLICITATION_DELAY,
MAX_RTR_SOLICITATION_DELAY, /* rtr solicit delay */
#ifdef CONFIG_IPV6_PRIVACY #ifdef CONFIG_IPV6_PRIVACY
.use_tempaddr = 0, .use_tempaddr = 0,
.temp_valid_lft = TEMP_VALID_LIFETIME, .temp_valid_lft = TEMP_VALID_LIFETIME,
.temp_prefered_lft = TEMP_PREFERRED_LIFETIME, .temp_prefered_lft = TEMP_PREFERRED_LIFETIME,
.regen_max_retry = REGEN_MAX_RETRY, .regen_max_retry = REGEN_MAX_RETRY,
.max_desync_factor = MAX_DESYNC_FACTOR, .max_desync_factor = MAX_DESYNC_FACTOR,
#endif #endif
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment