Commit f802b699 authored by David S. Miller's avatar David S. Miller

Merge nuts.ninka.net:/home/davem/src/BK/network-2.5

into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents 611f4c04 3483dece
...@@ -308,6 +308,15 @@ M: marcel@holtmann.org ...@@ -308,6 +308,15 @@ M: marcel@holtmann.org
W: http://www.holtmann.org/linux/bluetooth/ W: http://www.holtmann.org/linux/bluetooth/
S: Maintained S: Maintained
BONDING DRIVER
P: Chad Tindel
M: ctindel@users.sourceforge.net
P: Jay Vosburgh
M: fubar@us.ibm.com
L: bonding-devel@lists.sourceforge.net
W: http://sourceforge.net/projects/bonding/
S: Supported
BTTV VIDEO4LINUX DRIVER BTTV VIDEO4LINUX DRIVER
P: Gerd Knorr P: Gerd Knorr
M: kraxel@bytesex.org M: kraxel@bytesex.org
......
...@@ -1102,7 +1102,7 @@ static inline int skb_cow(struct sk_buff *skb, unsigned int headroom) ...@@ -1102,7 +1102,7 @@ static inline int skb_cow(struct sk_buff *skb, unsigned int headroom)
static inline struct sk_buff *skb_padto(struct sk_buff *skb, unsigned int len) static inline struct sk_buff *skb_padto(struct sk_buff *skb, unsigned int len)
{ {
unsigned int size = skb->len + skb->data_len; unsigned int size = skb->len;
if (likely(size >= len)) if (likely(size >= len))
return skb; return skb;
return skb_pad(skb, len-size); return skb_pad(skb, len-size);
......
...@@ -2414,7 +2414,7 @@ ctl_table ipv4_route_table[] = { ...@@ -2414,7 +2414,7 @@ ctl_table ipv4_route_table[] = {
.data = &flush_delay, .data = &flush_delay,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&ipv4_sysctl_rtcache_flush, .proc_handler = &ipv4_sysctl_rtcache_flush,
.strategy = &ipv4_sysctl_rtcache_flush_strategy, .strategy = &ipv4_sysctl_rtcache_flush_strategy,
}, },
{ {
...@@ -2423,7 +2423,7 @@ ctl_table ipv4_route_table[] = { ...@@ -2423,7 +2423,7 @@ ctl_table ipv4_route_table[] = {
.data = &ip_rt_min_delay, .data = &ip_rt_min_delay,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
.strategy = &sysctl_jiffies, .strategy = &sysctl_jiffies,
}, },
{ {
...@@ -2432,7 +2432,7 @@ ctl_table ipv4_route_table[] = { ...@@ -2432,7 +2432,7 @@ ctl_table ipv4_route_table[] = {
.data = &ip_rt_max_delay, .data = &ip_rt_max_delay,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
.strategy = &sysctl_jiffies, .strategy = &sysctl_jiffies,
}, },
{ {
...@@ -2441,7 +2441,7 @@ ctl_table ipv4_route_table[] = { ...@@ -2441,7 +2441,7 @@ ctl_table ipv4_route_table[] = {
.data = &ipv4_dst_ops.gc_thresh, .data = &ipv4_dst_ops.gc_thresh,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_IPV4_ROUTE_MAX_SIZE, .ctl_name = NET_IPV4_ROUTE_MAX_SIZE,
...@@ -2449,7 +2449,7 @@ ctl_table ipv4_route_table[] = { ...@@ -2449,7 +2449,7 @@ ctl_table ipv4_route_table[] = {
.data = &ip_rt_max_size, .data = &ip_rt_max_size,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_IPV4_ROUTE_GC_MIN_INTERVAL, .ctl_name = NET_IPV4_ROUTE_GC_MIN_INTERVAL,
...@@ -2457,7 +2457,7 @@ ctl_table ipv4_route_table[] = { ...@@ -2457,7 +2457,7 @@ ctl_table ipv4_route_table[] = {
.data = &ip_rt_gc_min_interval, .data = &ip_rt_gc_min_interval,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
.strategy = &sysctl_jiffies, .strategy = &sysctl_jiffies,
}, },
{ {
...@@ -2466,7 +2466,7 @@ ctl_table ipv4_route_table[] = { ...@@ -2466,7 +2466,7 @@ ctl_table ipv4_route_table[] = {
.data = &ip_rt_gc_timeout, .data = &ip_rt_gc_timeout,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
.strategy = &sysctl_jiffies, .strategy = &sysctl_jiffies,
}, },
{ {
...@@ -2475,7 +2475,7 @@ ctl_table ipv4_route_table[] = { ...@@ -2475,7 +2475,7 @@ ctl_table ipv4_route_table[] = {
.data = &ip_rt_gc_interval, .data = &ip_rt_gc_interval,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
.strategy = &sysctl_jiffies, .strategy = &sysctl_jiffies,
}, },
{ {
...@@ -2484,7 +2484,7 @@ ctl_table ipv4_route_table[] = { ...@@ -2484,7 +2484,7 @@ ctl_table ipv4_route_table[] = {
.data = &ip_rt_redirect_load, .data = &ip_rt_redirect_load,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_IPV4_ROUTE_REDIRECT_NUMBER, .ctl_name = NET_IPV4_ROUTE_REDIRECT_NUMBER,
...@@ -2492,7 +2492,7 @@ ctl_table ipv4_route_table[] = { ...@@ -2492,7 +2492,7 @@ ctl_table ipv4_route_table[] = {
.data = &ip_rt_redirect_number, .data = &ip_rt_redirect_number,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_IPV4_ROUTE_REDIRECT_SILENCE, .ctl_name = NET_IPV4_ROUTE_REDIRECT_SILENCE,
...@@ -2500,7 +2500,7 @@ ctl_table ipv4_route_table[] = { ...@@ -2500,7 +2500,7 @@ ctl_table ipv4_route_table[] = {
.data = &ip_rt_redirect_silence, .data = &ip_rt_redirect_silence,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_IPV4_ROUTE_ERROR_COST, .ctl_name = NET_IPV4_ROUTE_ERROR_COST,
...@@ -2508,7 +2508,7 @@ ctl_table ipv4_route_table[] = { ...@@ -2508,7 +2508,7 @@ ctl_table ipv4_route_table[] = {
.data = &ip_rt_error_cost, .data = &ip_rt_error_cost,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_IPV4_ROUTE_ERROR_BURST, .ctl_name = NET_IPV4_ROUTE_ERROR_BURST,
...@@ -2516,7 +2516,7 @@ ctl_table ipv4_route_table[] = { ...@@ -2516,7 +2516,7 @@ ctl_table ipv4_route_table[] = {
.data = &ip_rt_error_burst, .data = &ip_rt_error_burst,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_IPV4_ROUTE_GC_ELASTICITY, .ctl_name = NET_IPV4_ROUTE_GC_ELASTICITY,
...@@ -2524,7 +2524,7 @@ ctl_table ipv4_route_table[] = { ...@@ -2524,7 +2524,7 @@ ctl_table ipv4_route_table[] = {
.data = &ip_rt_gc_elasticity, .data = &ip_rt_gc_elasticity,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_IPV4_ROUTE_MTU_EXPIRES, .ctl_name = NET_IPV4_ROUTE_MTU_EXPIRES,
...@@ -2532,7 +2532,7 @@ ctl_table ipv4_route_table[] = { ...@@ -2532,7 +2532,7 @@ ctl_table ipv4_route_table[] = {
.data = &ip_rt_mtu_expires, .data = &ip_rt_mtu_expires,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
.strategy = &sysctl_jiffies, .strategy = &sysctl_jiffies,
}, },
{ {
...@@ -2541,7 +2541,7 @@ ctl_table ipv4_route_table[] = { ...@@ -2541,7 +2541,7 @@ ctl_table ipv4_route_table[] = {
.data = &ip_rt_min_pmtu, .data = &ip_rt_min_pmtu,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
.ctl_name = NET_IPV4_ROUTE_MIN_ADVMSS, .ctl_name = NET_IPV4_ROUTE_MIN_ADVMSS,
...@@ -2549,9 +2549,9 @@ ctl_table ipv4_route_table[] = { ...@@ -2549,9 +2549,9 @@ ctl_table ipv4_route_table[] = {
.data = &ip_rt_min_advmss, .data = &ip_rt_min_advmss,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler =&proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ 0 } { .ctl_name = 0 }
}; };
#endif #endif
......
...@@ -63,10 +63,14 @@ static int verify_newsa_info(struct xfrm_usersa_info *p, ...@@ -63,10 +63,14 @@ static int verify_newsa_info(struct xfrm_usersa_info *p,
case AF_INET: case AF_INET:
break; break;
case AF_INET6: /* XXX */ case AF_INET6:
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
break;
#else
err = -EAFNOSUPPORT; err = -EAFNOSUPPORT;
goto out;
#endif
/* fallthru */
default: default:
goto out; goto out;
}; };
...@@ -171,7 +175,19 @@ static struct xfrm_state *xfrm_state_construct(struct xfrm_usersa_info *p, ...@@ -171,7 +175,19 @@ static struct xfrm_state *xfrm_state_construct(struct xfrm_usersa_info *p,
goto error; goto error;
err = -ENOENT; err = -ENOENT;
switch (x->props.family) {
case AF_INET:
x->type = xfrm_get_type(x->id.proto); x->type = xfrm_get_type(x->id.proto);
break;
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
case AF_INET6:
x->type = xfrm6_get_type(x->id.proto);
break;
#endif
default:
x->type = NULL;
break;
}
if (x->type == NULL) if (x->type == NULL)
goto error; goto error;
...@@ -206,8 +222,21 @@ static int xfrm_add_sa(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma) ...@@ -206,8 +222,21 @@ static int xfrm_add_sa(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma)
if (!x) if (!x)
return err; return err;
switch (x->props.family) {
case AF_INET:
x1 = xfrm_state_lookup(x->props.saddr.xfrm4_addr, x1 = xfrm_state_lookup(x->props.saddr.xfrm4_addr,
x->id.spi, x->id.proto); x->id.spi, x->id.proto);
break;
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
case AF_INET6:
x1 = xfrm6_state_lookup((struct in6_addr*)x->props.saddr.a6,
x->id.spi, x->id.proto);
break;
#endif
default:
x1 = NULL;
break;
}
if (x1) { if (x1) {
xfrm_state_put(x); xfrm_state_put(x);
xfrm_state_put(x1); xfrm_state_put(x1);
...@@ -224,7 +253,19 @@ static int xfrm_del_sa(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma) ...@@ -224,7 +253,19 @@ static int xfrm_del_sa(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma)
struct xfrm_state *x; struct xfrm_state *x;
struct xfrm_usersa_id *p = NLMSG_DATA(nlh); struct xfrm_usersa_id *p = NLMSG_DATA(nlh);
switch (p->family) {
case AF_INET:
x = xfrm_state_lookup(p->saddr.xfrm4_addr, p->spi, p->proto); x = xfrm_state_lookup(p->saddr.xfrm4_addr, p->spi, p->proto);
break;
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
case AF_INET6:
x = xfrm6_state_lookup((struct in6_addr*)p->saddr.a6, p->spi, p->proto);
break;
#endif
default:
x = NULL;
break;
}
if (x == NULL) if (x == NULL)
return -ESRCH; return -ESRCH;
...@@ -342,7 +383,19 @@ static int xfrm_get_sa(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma) ...@@ -342,7 +383,19 @@ static int xfrm_get_sa(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma)
struct sk_buff *resp_skb; struct sk_buff *resp_skb;
int err; int err;
switch (p->family) {
case AF_INET:
x = xfrm_state_lookup(p->saddr.xfrm4_addr, p->spi, p->proto); x = xfrm_state_lookup(p->saddr.xfrm4_addr, p->spi, p->proto);
break;
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
case AF_INET6:
x = xfrm6_state_lookup((struct in6_addr*)p->saddr.a6, p->spi, p->proto);
break;
#endif
default:
x = NULL;
break;
}
err = -ESRCH; err = -ESRCH;
if (x == NULL) if (x == NULL)
goto out_noput; goto out_noput;
...@@ -393,9 +446,23 @@ static int xfrm_alloc_userspi(struct sk_buff *skb, struct nlmsghdr *nlh, void ** ...@@ -393,9 +446,23 @@ static int xfrm_alloc_userspi(struct sk_buff *skb, struct nlmsghdr *nlh, void **
err = verify_userspi_info(p); err = verify_userspi_info(p);
if (err) if (err)
goto out_noput; goto out_noput;
switch (p->info.family) {
case AF_INET:
x = xfrm_find_acq(p->info.mode, p->info.reqid, p->info.id.proto, x = xfrm_find_acq(p->info.mode, p->info.reqid, p->info.id.proto,
p->info.sel.daddr.xfrm4_addr, p->info.sel.daddr.xfrm4_addr,
p->info.sel.saddr.xfrm4_addr, 1); p->info.sel.saddr.xfrm4_addr, 1);
break;
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
case AF_INET6:
x = xfrm6_find_acq(p->info.mode, p->info.reqid, p->info.id.proto,
(struct in6_addr*)p->info.sel.daddr.a6,
(struct in6_addr*)p->info.sel.saddr.a6, 1);
break;
#endif
default:
x = NULL;
break;
}
err = -ENOENT; err = -ENOENT;
if (x == NULL) if (x == NULL)
goto out_noput; goto out_noput;
......
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