aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-11-02 11:50:46 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-11-02 11:50:46 -0500
commiteb193e405155c5680ca1560b040b1551566660f9 (patch)
treee4613f9c3a9106c0d05fb3f048fb38068f64843a
parent0ca2b776ab1f4ba99d7f592baa4ff8525e53b050 (diff)
parent6f5b7ef6b5816dc497094048d7d8a270004602d6 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [NETFILTER]: silence a warning in ebtables [IPV6]: File the fingerprints off ah6->spi/esp6->spi [TCP]: Set default congestion control when no sysctl. [TIPC] net/tipc/port.c: fix NULL dereference
-rw-r--r--net/bridge/netfilter/ebtables.c2
-rw-r--r--net/ipv4/sysctl_net_ipv4.c7
-rw-r--r--net/ipv4/tcp_cong.c8
-rw-r--r--net/ipv6/xfrm6_tunnel.c4
-rw-r--r--net/tipc/port.c5
5 files changed, 14 insertions, 12 deletions
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 3df55b2bd91d..9f85666f29f7 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -86,7 +86,7 @@ static inline int ebt_do_match (struct ebt_entry_match *m,
86static inline int ebt_dev_check(char *entry, const struct net_device *device) 86static inline int ebt_dev_check(char *entry, const struct net_device *device)
87{ 87{
88 int i = 0; 88 int i = 0;
89 char *devname = device->name; 89 const char *devname = device->name;
90 90
91 if (*entry == '\0') 91 if (*entry == '\0')
92 return 0; 92 return 0;
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index e82a5be894b5..15061b314411 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -129,13 +129,6 @@ static int sysctl_tcp_congestion_control(ctl_table *table, int __user *name,
129 return ret; 129 return ret;
130} 130}
131 131
132static int __init tcp_congestion_default(void)
133{
134 return tcp_set_default_congestion_control(CONFIG_DEFAULT_TCP_CONG);
135}
136
137late_initcall(tcp_congestion_default);
138
139ctl_table ipv4_table[] = { 132ctl_table ipv4_table[] = {
140 { 133 {
141 .ctl_name = NET_IPV4_TCP_TIMESTAMPS, 134 .ctl_name = NET_IPV4_TCP_TIMESTAMPS,
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index af0aca1e6be6..1e2982f4acd4 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -131,6 +131,14 @@ int tcp_set_default_congestion_control(const char *name)
131 return ret; 131 return ret;
132} 132}
133 133
134/* Set default value from kernel configuration at bootup */
135static int __init tcp_congestion_default(void)
136{
137 return tcp_set_default_congestion_control(CONFIG_DEFAULT_TCP_CONG);
138}
139late_initcall(tcp_congestion_default);
140
141
134/* Get current default congestion control */ 142/* Get current default congestion control */
135void tcp_get_default_congestion_control(char *name) 143void tcp_get_default_congestion_control(char *name)
136{ 144{
diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c
index 7af227bb1551..7931e4f898d4 100644
--- a/net/ipv6/xfrm6_tunnel.c
+++ b/net/ipv6/xfrm6_tunnel.c
@@ -135,7 +135,7 @@ u32 xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr)
135 x6spi = __xfrm6_tunnel_spi_lookup(saddr); 135 x6spi = __xfrm6_tunnel_spi_lookup(saddr);
136 spi = x6spi ? x6spi->spi : 0; 136 spi = x6spi ? x6spi->spi : 0;
137 read_unlock_bh(&xfrm6_tunnel_spi_lock); 137 read_unlock_bh(&xfrm6_tunnel_spi_lock);
138 return spi; 138 return htonl(spi);
139} 139}
140 140
141EXPORT_SYMBOL(xfrm6_tunnel_spi_lookup); 141EXPORT_SYMBOL(xfrm6_tunnel_spi_lookup);
@@ -210,7 +210,7 @@ u32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr)
210 spi = __xfrm6_tunnel_alloc_spi(saddr); 210 spi = __xfrm6_tunnel_alloc_spi(saddr);
211 write_unlock_bh(&xfrm6_tunnel_spi_lock); 211 write_unlock_bh(&xfrm6_tunnel_spi_lock);
212 212
213 return spi; 213 return htonl(spi);
214} 214}
215 215
216EXPORT_SYMBOL(xfrm6_tunnel_alloc_spi); 216EXPORT_SYMBOL(xfrm6_tunnel_alloc_spi);
diff --git a/net/tipc/port.c b/net/tipc/port.c
index c1a1a76759b5..b7f3199523ca 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -1136,11 +1136,12 @@ int tipc_publish(u32 ref, unsigned int scope, struct tipc_name_seq const *seq)
1136 int res = -EINVAL; 1136 int res = -EINVAL;
1137 1137
1138 p_ptr = tipc_port_lock(ref); 1138 p_ptr = tipc_port_lock(ref);
1139 if (!p_ptr)
1140 return -EINVAL;
1141
1139 dbg("tipc_publ %u, p_ptr = %x, conn = %x, scope = %x, " 1142 dbg("tipc_publ %u, p_ptr = %x, conn = %x, scope = %x, "
1140 "lower = %u, upper = %u\n", 1143 "lower = %u, upper = %u\n",
1141 ref, p_ptr, p_ptr->publ.connected, scope, seq->lower, seq->upper); 1144 ref, p_ptr, p_ptr->publ.connected, scope, seq->lower, seq->upper);
1142 if (!p_ptr)
1143 return -EINVAL;
1144 if (p_ptr->publ.connected) 1145 if (p_ptr->publ.connected)
1145 goto exit; 1146 goto exit;
1146 if (seq->lower > seq->upper) 1147 if (seq->lower > seq->upper)