summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-04 07:40:19 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-04 07:40:19 +0000
commit33263fc5f9ac8e8cb2b22d06af3ce5ac1dd815e4 (patch)
tree2d1b86a40bef0958a68cf1a2eafbeb0667a70543 /net/ipv4
parent216f5f51aa02f8b113aa620ebc14a9631a217a00 (diff)
Merge with Linux 2.3.32.
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/af_inet.c12
-rw-r--r--net/ipv4/arp.c30
-rw-r--r--net/ipv4/fib_frontend.c2
-rw-r--r--net/ipv4/igmp.c2
-rw-r--r--net/ipv4/ip_output.c2
-rw-r--r--net/ipv4/ipmr.c4
-rw-r--r--net/ipv4/proc.c6
-rw-r--r--net/ipv4/raw.c2
-rw-r--r--net/ipv4/route.c4
-rw-r--r--net/ipv4/tcp_input.c2
-rw-r--r--net/ipv4/tcp_ipv4.c2
-rw-r--r--net/ipv4/udp.c2
12 files changed, 46 insertions, 24 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 396cf38d8..5c370cc7c 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -119,12 +119,12 @@ struct linux_mib net_statistics;
atomic_t inet_sock_nr;
-extern int raw_get_info(char *, char **, off_t, int, int);
-extern int snmp_get_info(char *, char **, off_t, int, int);
-extern int netstat_get_info(char *, char **, off_t, int, int);
-extern int afinet_get_info(char *, char **, off_t, int, int);
-extern int tcp_get_info(char *, char **, off_t, int, int);
-extern int udp_get_info(char *, char **, off_t, int, int);
+extern int raw_get_info(char *, char **, off_t, int);
+extern int snmp_get_info(char *, char **, off_t, int);
+extern int netstat_get_info(char *, char **, off_t, int);
+extern int afinet_get_info(char *, char **, off_t, int);
+extern int tcp_get_info(char *, char **, off_t, int);
+extern int udp_get_info(char *, char **, off_t, int);
extern void ip_mc_drop_socket(struct sock *sk);
#ifdef CONFIG_DLCI
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 263cd36e0..f4272338b 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -205,9 +205,12 @@ int arp_mc_map(u32 addr, u8 *haddr, struct net_device *dev, int dir)
{
switch (dev->type) {
case ARPHRD_ETHER:
- case ARPHRD_IEEE802:
case ARPHRD_FDDI:
- ip_eth_mc_map(addr, haddr);
+ case ARPHRD_IEEE802:
+ ip_eth_mc_map(addr, haddr) ;
+ return 0 ;
+ case ARPHRD_IEEE802_TR:
+ ip_tr_mc_map(addr, haddr) ;
return 0;
default:
if (dir) {
@@ -522,6 +525,12 @@ void arp_send(int type, int ptype, u32 dest_ip,
arp->ar_pro = __constant_htons(ETH_P_IP);
break;
#endif
+#ifdef CONFIG_TR
+ case ARPHRD_IEEE802_TR:
+ arp->ar_hrd = __constant_htons(ARPHRD_IEEE802);
+ arp->ar_pro = __constant_htons(ETH_P_IP);
+ break;
+#endif
}
arp->ar_hln = dev->addr_len;
@@ -604,6 +613,19 @@ int arp_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt)
goto out;
break;
#endif
+#ifdef CONFIG_TR
+ case ARPHRD_IEEE802_TR:
+ /*
+ * Token ring devices will accept ARP hardware types of either
+ * 1 (Ethernet) or 6 (IEEE 802.2).
+ */
+ if (arp->ar_hrd != __constant_htons(ARPHRD_ETHER) &&
+ arp->ar_hrd != __constant_htons(ARPHRD_IEEE802))
+ goto out;
+ if (arp->ar_pro != __constant_htons(ETH_P_IP))
+ goto out;
+ break;
+#endif
#ifdef CONFIG_FDDI
case ARPHRD_FDDI:
/*
@@ -981,11 +1003,11 @@ out:
* Write the contents of the ARP cache to a PROCfs file.
*/
#ifndef CONFIG_PROC_FS
-static int arp_get_info(char *buffer, char **start, off_t offset, int length, int dummy) { return 0; }
+static int arp_get_info(char *buffer, char **start, off_t offset, int length) { return 0; }
#else
#define HBUFFERLEN 30
-static int arp_get_info(char *buffer, char **start, off_t offset, int length, int dummy)
+static int arp_get_info(char *buffer, char **start, off_t offset, int length)
{
int len=0;
off_t pos=0;
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 47cc41a92..d48704cc6 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -107,7 +107,7 @@ void fib_flush(void)
*/
static int
-fib_get_procinfo(char *buffer, char **start, off_t offset, int length, int dummy)
+fib_get_procinfo(char *buffer, char **start, off_t offset, int length)
{
int first = offset/128;
char *ptr = buffer;
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index 0ff9ffeda..5f4ab1078 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -757,7 +757,7 @@ int ip_check_mc(struct in_device *in_dev, u32 mc_addr)
#ifdef CONFIG_IP_MULTICAST
-int ip_mc_procinfo(char *buffer, char **start, off_t offset, int length, int dummy)
+int ip_mc_procinfo(char *buffer, char **start, off_t offset, int length)
{
off_t pos=0, begin=0;
struct ip_mc_list *im;
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index fa464f24c..159cacb1b 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1017,7 +1017,7 @@ void __init ip_init(void)
ip_rt_init();
#ifdef CONFIG_IP_MULTICAST
- proc_net_create("igmp", S_IFREG | S_IRUGO, ip_mc_procinfo);
+ proc_net_create("igmp", 0, ip_mc_procinfo);
#endif
}
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index b65d6f405..86393bfda 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -1576,7 +1576,7 @@ int ipmr_get_route(struct sk_buff *skb, struct rtmsg *rtm, int nowait)
* The /proc interfaces to multicast routing /proc/ip_mr_cache /proc/ip_mr_vif
*/
-int ipmr_vif_info(char *buffer, char **start, off_t offset, int length, int dummy)
+static int ipmr_vif_info(char *buffer, char **start, off_t offset, int length)
{
struct vif_device *vif;
int len=0;
@@ -1622,7 +1622,7 @@ int ipmr_vif_info(char *buffer, char **start, off_t offset, int length, int dumm
return len;
}
-int ipmr_mfc_info(char *buffer, char **start, off_t offset, int length, int dummy)
+static int ipmr_mfc_info(char *buffer, char **start, off_t offset, int length)
{
struct mfc_cache *mfc;
int len=0;
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c
index 7057c343a..e2068a3ab 100644
--- a/net/ipv4/proc.c
+++ b/net/ipv4/proc.c
@@ -53,7 +53,7 @@
/*
* Report socket allocation statistics [mea@utu.fi]
*/
-int afinet_get_info(char *buffer, char **start, off_t offset, int length, int dummy)
+int afinet_get_info(char *buffer, char **start, off_t offset, int length)
{
/* From net/socket.c */
extern int socket_get_info(char *, char **, off_t, int);
@@ -85,7 +85,7 @@ int afinet_get_info(char *buffer, char **start, off_t offset, int length, int du
* Called from the PROCfs module. This outputs /proc/net/snmp.
*/
-int snmp_get_info(char *buffer, char **start, off_t offset, int length, int dummy)
+int snmp_get_info(char *buffer, char **start, off_t offset, int length)
{
extern struct tcp_mib tcp_statistics;
extern struct udp_mib udp_statistics;
@@ -164,7 +164,7 @@ int snmp_get_info(char *buffer, char **start, off_t offset, int length, int dumm
* Output /proc/net/netstat
*/
-int netstat_get_info(char *buffer, char **start, off_t offset, int length, int dummy)
+int netstat_get_info(char *buffer, char **start, off_t offset, int length)
{
extern struct linux_mib net_statistics;
int len;
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 83044d2cd..d44552176 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -603,7 +603,7 @@ static void get_raw_sock(struct sock *sp, char *tmpbuf, int i)
atomic_read(&sp->refcnt), sp);
}
-int raw_get_info(char *buffer, char **start, off_t offset, int length, int dummy)
+int raw_get_info(char *buffer, char **start, off_t offset, int length)
{
int len = 0, num = 0, i;
off_t pos = 0;
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 2fe7e0fdb..33b27036f 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -202,9 +202,9 @@ static __inline__ unsigned rt_hash_code(u32 daddr, u32 saddr, u8 tos)
}
#ifndef CONFIG_PROC_FS
-static int rt_cache_get_info(char *buffer, char **start, off_t offset, int length, int dummy) { return 0; }
+static int rt_cache_get_info(char *buffer, char **start, off_t offset, int length) { return 0; }
#else
-static int rt_cache_get_info(char *buffer, char **start, off_t offset, int length, int dummy)
+static int rt_cache_get_info(char *buffer, char **start, off_t offset, int length)
{
int len=0;
off_t pos=0;
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 0472ba4f8..14fa4f80d 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2760,7 +2760,7 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
if(!sk->dead) {
wake_up_interruptible(sk->sleep);
- sock_wake_async(sk->socket, 0, POLL_IN);
+ sock_wake_async(sk->socket, 0, POLL_OUT);
}
return -1;
}
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 87ec2d773..8e2c56654 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2076,7 +2076,7 @@ static void get_timewait_sock(struct tcp_tw_bucket *tw, char *tmpbuf, int i)
atomic_read(&tw->refcnt), tw);
}
-int tcp_get_info(char *buffer, char **start, off_t offset, int length, int dummy)
+int tcp_get_info(char *buffer, char **start, off_t offset, int length)
{
int len = 0, num = 0, i;
off_t begin, pos = 0;
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index bffd5b727..518572142 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1051,7 +1051,7 @@ static void get_udp_sock(struct sock *sp, char *tmpbuf, int i)
atomic_read(&sp->refcnt), sp);
}
-int udp_get_info(char *buffer, char **start, off_t offset, int length, int dummy)
+int udp_get_info(char *buffer, char **start, off_t offset, int length)
{
int len = 0, num = 0, i;
off_t pos = 0;