Commit 87477c8b authored by David S. Miller's avatar David S. Miller

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

into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents 702d27c7 916db246
...@@ -2068,6 +2068,7 @@ __u32 secure_tcpv6_sequence_number(__u32 *saddr, __u32 *daddr, ...@@ -2068,6 +2068,7 @@ __u32 secure_tcpv6_sequence_number(__u32 *saddr, __u32 *daddr,
seq += tv.tv_usec + tv.tv_sec*1000000; seq += tv.tv_usec + tv.tv_sec*1000000;
return seq; return seq;
} }
EXPORT_SYMBOL(secure_tcpv6_sequence_number);
__u32 secure_ipv6_id(__u32 *daddr) __u32 secure_ipv6_id(__u32 *daddr)
{ {
...@@ -2088,6 +2089,7 @@ __u32 secure_ipv6_id(__u32 *daddr) ...@@ -2088,6 +2089,7 @@ __u32 secure_ipv6_id(__u32 *daddr)
return twothirdsMD4Transform(daddr, secret); return twothirdsMD4Transform(daddr, secret);
} }
EXPORT_SYMBOL(secure_ipv6_id);
#endif #endif
......
...@@ -54,12 +54,6 @@ static int pneigh_ifdown(struct neigh_table *tbl, struct net_device *dev); ...@@ -54,12 +54,6 @@ static int pneigh_ifdown(struct neigh_table *tbl, struct net_device *dev);
static int neigh_glbl_allocs; static int neigh_glbl_allocs;
static struct neigh_table *neigh_tables; static struct neigh_table *neigh_tables;
#if defined(__i386__) && defined(CONFIG_SMP)
#define ASSERT_WL(n) if ((int)((n)->lock.lock) > 0) { printk("WL assertion failed at " __FILE__ "(%d):" __FUNCTION__ "\n", __LINE__); }
#else
#define ASSERT_WL(n) do { } while(0)
#endif
/* /*
Neighbour hash table buckets are protected with rwlock tbl->lock. Neighbour hash table buckets are protected with rwlock tbl->lock.
...@@ -484,8 +478,6 @@ static void neigh_suspect(struct neighbour *neigh) ...@@ -484,8 +478,6 @@ static void neigh_suspect(struct neighbour *neigh)
NEIGH_PRINTK2("neigh %p is suspecteded.\n", neigh); NEIGH_PRINTK2("neigh %p is suspecteded.\n", neigh);
ASSERT_WL(neigh);
neigh->output = neigh->ops->output; neigh->output = neigh->ops->output;
for (hh = neigh->hh; hh; hh = hh->hh_next) for (hh = neigh->hh; hh; hh = hh->hh_next)
...@@ -503,8 +495,6 @@ static void neigh_connect(struct neighbour *neigh) ...@@ -503,8 +495,6 @@ static void neigh_connect(struct neighbour *neigh)
NEIGH_PRINTK2("neigh %p is connected.\n", neigh); NEIGH_PRINTK2("neigh %p is connected.\n", neigh);
ASSERT_WL(neigh);
neigh->output = neigh->ops->connected_output; neigh->output = neigh->ops->connected_output;
for (hh = neigh->hh; hh; hh = hh->hh_next) for (hh = neigh->hh; hh; hh = hh->hh_next)
...@@ -529,7 +519,6 @@ static void neigh_sync(struct neighbour *n) ...@@ -529,7 +519,6 @@ static void neigh_sync(struct neighbour *n)
unsigned long now = jiffies; unsigned long now = jiffies;
u8 state = n->nud_state; u8 state = n->nud_state;
ASSERT_WL(n);
if (state&(NUD_NOARP|NUD_PERMANENT)) if (state&(NUD_NOARP|NUD_PERMANENT))
return; return;
if (state&NUD_REACHABLE) { if (state&NUD_REACHABLE) {
......
...@@ -513,7 +513,7 @@ void arp_send(int type, int ptype, u32 dest_ip, ...@@ -513,7 +513,7 @@ void arp_send(int type, int ptype, u32 dest_ip,
skb->nh.raw = skb->data; skb->nh.raw = skb->data;
arp = (struct arphdr *) skb_put(skb,sizeof(struct arphdr) + 2*(dev->addr_len+4)); arp = (struct arphdr *) skb_put(skb,sizeof(struct arphdr) + 2*(dev->addr_len+4));
skb->dev = dev; skb->dev = dev;
skb->protocol = __constant_htons (ETH_P_ARP); skb->protocol = htons(ETH_P_ARP);
if (src_hw == NULL) if (src_hw == NULL)
src_hw = dev->dev_addr; src_hw = dev->dev_addr;
if (dest_hw == NULL) if (dest_hw == NULL)
...@@ -539,33 +539,33 @@ void arp_send(int type, int ptype, u32 dest_ip, ...@@ -539,33 +539,33 @@ void arp_send(int type, int ptype, u32 dest_ip,
switch (dev->type) { switch (dev->type) {
default: default:
arp->ar_hrd = htons(dev->type); arp->ar_hrd = htons(dev->type);
arp->ar_pro = __constant_htons(ETH_P_IP); arp->ar_pro = htons(ETH_P_IP);
break; break;
#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
case ARPHRD_AX25: case ARPHRD_AX25:
arp->ar_hrd = __constant_htons(ARPHRD_AX25); arp->ar_hrd = htons(ARPHRD_AX25);
arp->ar_pro = __constant_htons(AX25_P_IP); arp->ar_pro = htons(AX25_P_IP);
break; break;
#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE) #if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
case ARPHRD_NETROM: case ARPHRD_NETROM:
arp->ar_hrd = __constant_htons(ARPHRD_NETROM); arp->ar_hrd = htons(ARPHRD_NETROM);
arp->ar_pro = __constant_htons(AX25_P_IP); arp->ar_pro = htons(AX25_P_IP);
break; break;
#endif #endif
#endif #endif
#ifdef CONFIG_FDDI #ifdef CONFIG_FDDI
case ARPHRD_FDDI: case ARPHRD_FDDI:
arp->ar_hrd = __constant_htons(ARPHRD_ETHER); arp->ar_hrd = htons(ARPHRD_ETHER);
arp->ar_pro = __constant_htons(ETH_P_IP); arp->ar_pro = htons(ETH_P_IP);
break; break;
#endif #endif
#ifdef CONFIG_TR #ifdef CONFIG_TR
case ARPHRD_IEEE802_TR: case ARPHRD_IEEE802_TR:
arp->ar_hrd = __constant_htons(ARPHRD_IEEE802); arp->ar_hrd = htons(ARPHRD_IEEE802);
arp->ar_pro = __constant_htons(ETH_P_IP); arp->ar_pro = htons(ETH_P_IP);
break; break;
#endif #endif
} }
...@@ -629,77 +629,49 @@ int arp_process(struct sk_buff *skb) ...@@ -629,77 +629,49 @@ int arp_process(struct sk_buff *skb)
switch (dev_type) { switch (dev_type) {
default: default:
if (arp->ar_pro != __constant_htons(ETH_P_IP)) if (arp->ar_pro != htons(ETH_P_IP) ||
goto out; htons(dev_type) != arp->ar_hrd)
if (htons(dev_type) != arp->ar_hrd)
goto out; goto out;
break; break;
#ifdef CONFIG_NET_ETHERNET #ifdef CONFIG_NET_ETHERNET
case ARPHRD_ETHER: case ARPHRD_ETHER:
/*
* ETHERNET 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 #endif
#ifdef CONFIG_TR #ifdef CONFIG_TR
case ARPHRD_IEEE802_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 #endif
#ifdef CONFIG_FDDI #ifdef CONFIG_FDDI
case ARPHRD_FDDI: case ARPHRD_FDDI:
/*
* According to RFC 1390, FDDI devices should accept ARP hardware types
* of 1 (Ethernet). However, to be more robust, we'll accept 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 #endif
#ifdef CONFIG_NET_FC #ifdef CONFIG_NET_FC
case ARPHRD_IEEE802: case ARPHRD_IEEE802:
#endif
#if defined(CONFIG_NET_ETHERNET) || defined(CONFIG_TR) || \
defined(CONFIG_FDDI) || defined(CONFIG_NET_FC)
/* /*
* According to RFC 2625, Fibre Channel devices (which are IEEE * ETHERNET, Token Ring and Fibre Channel (which are IEEE 802
* 802 devices) should accept ARP hardware types of 6 (IEEE 802) * devices, according to RFC 2625) devices will accept ARP
* and 1 (Ethernet). * hardware types of either 1 (Ethernet) or 6 (IEEE 802.2).
* This is the case also of FDDI, where the RFC 1390 says that
* FDDI devices should accept ARP hardware of (1) Ethernet,
* however, to be more robust, we'll accept both 1 (Ethernet)
* or 6 (IEEE 802.2)
*/ */
if (arp->ar_hrd != __constant_htons(ARPHRD_ETHER) && if ((arp->ar_hrd != htons(ARPHRD_ETHER) &&
arp->ar_hrd != __constant_htons(ARPHRD_IEEE802)) arp->ar_hrd != htons(ARPHRD_IEEE802)) ||
goto out; arp->ar_pro != htons(ETH_P_IP))
if (arp->ar_pro != __constant_htons(ETH_P_IP))
goto out; goto out;
break; break;
#endif #endif
#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
case ARPHRD_AX25: case ARPHRD_AX25:
if (arp->ar_pro != __constant_htons(AX25_P_IP)) if (arp->ar_pro != htons(AX25_P_IP) ||
goto out; arp->ar_hrd != htons(ARPHRD_AX25))
if (arp->ar_hrd != __constant_htons(ARPHRD_AX25))
goto out; goto out;
break; break;
#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE) #if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
case ARPHRD_NETROM: case ARPHRD_NETROM:
if (arp->ar_pro != __constant_htons(AX25_P_IP)) if (arp->ar_pro != htons(AX25_P_IP) ||
goto out; arp->ar_hrd != htons(ARPHRD_NETROM))
if (arp->ar_hrd != __constant_htons(ARPHRD_NETROM))
goto out; goto out;
break; break;
#endif #endif
...@@ -708,18 +680,18 @@ int arp_process(struct sk_buff *skb) ...@@ -708,18 +680,18 @@ int arp_process(struct sk_buff *skb)
/* Understand only these message types */ /* Understand only these message types */
if (arp->ar_op != __constant_htons(ARPOP_REPLY) && if (arp->ar_op != htons(ARPOP_REPLY) &&
arp->ar_op != __constant_htons(ARPOP_REQUEST)) arp->ar_op != htons(ARPOP_REQUEST))
goto out; goto out;
/* /*
* Extract fields * Extract fields
*/ */
sha=arp_ptr; sha = arp_ptr;
arp_ptr += dev->addr_len; arp_ptr += dev->addr_len;
memcpy(&sip, arp_ptr, 4); memcpy(&sip, arp_ptr, 4);
arp_ptr += 4; arp_ptr += 4;
tha=arp_ptr; tha = arp_ptr;
arp_ptr += dev->addr_len; arp_ptr += dev->addr_len;
memcpy(&tip, arp_ptr, 4); memcpy(&tip, arp_ptr, 4);
/* /*
...@@ -754,13 +726,13 @@ int arp_process(struct sk_buff *skb) ...@@ -754,13 +726,13 @@ int arp_process(struct sk_buff *skb)
/* Special case: IPv4 duplicate address detection packet (RFC2131) */ /* Special case: IPv4 duplicate address detection packet (RFC2131) */
if (sip == 0) { if (sip == 0) {
if (arp->ar_op == __constant_htons(ARPOP_REQUEST) && if (arp->ar_op == htons(ARPOP_REQUEST) &&
inet_addr_type(tip) == RTN_LOCAL) inet_addr_type(tip) == RTN_LOCAL)
arp_send(ARPOP_REPLY,ETH_P_ARP,tip,dev,tip,sha,dev->dev_addr,dev->dev_addr); arp_send(ARPOP_REPLY,ETH_P_ARP,tip,dev,tip,sha,dev->dev_addr,dev->dev_addr);
goto out; goto out;
} }
if (arp->ar_op == __constant_htons(ARPOP_REQUEST) && if (arp->ar_op == htons(ARPOP_REQUEST) &&
ip_route_input(skb, tip, sip, 0, dev) == 0) { ip_route_input(skb, tip, sip, 0, dev) == 0) {
rt = (struct rtable*)skb->dst; rt = (struct rtable*)skb->dst;
...@@ -810,7 +782,7 @@ int arp_process(struct sk_buff *skb) ...@@ -810,7 +782,7 @@ int arp_process(struct sk_buff *skb)
devices (strip is candidate) devices (strip is candidate)
*/ */
if (n == NULL && if (n == NULL &&
arp->ar_op == __constant_htons(ARPOP_REPLY) && arp->ar_op == htons(ARPOP_REPLY) &&
inet_addr_type(sip) == RTN_UNICAST) inet_addr_type(sip) == RTN_UNICAST)
n = __neigh_lookup(&arp_tbl, &sip, dev, -1); n = __neigh_lookup(&arp_tbl, &sip, dev, -1);
#endif #endif
...@@ -830,7 +802,7 @@ int arp_process(struct sk_buff *skb) ...@@ -830,7 +802,7 @@ int arp_process(struct sk_buff *skb)
/* Broadcast replies and request packets /* Broadcast replies and request packets
do not assert neighbour reachability. do not assert neighbour reachability.
*/ */
if (arp->ar_op != __constant_htons(ARPOP_REPLY) || if (arp->ar_op != htons(ARPOP_REPLY) ||
skb->pkt_type != PACKET_HOST) skb->pkt_type != PACKET_HOST)
state = NUD_STALE; state = NUD_STALE;
neigh_update(n, sha, state, override, 1); neigh_update(n, sha, state, override, 1);
...@@ -983,7 +955,8 @@ int arp_req_delete(struct arpreq *r, struct net_device * dev) ...@@ -983,7 +955,8 @@ int arp_req_delete(struct arpreq *r, struct net_device * dev)
struct neighbour *neigh; struct neighbour *neigh;
if (r->arp_flags & ATF_PUBL) { if (r->arp_flags & ATF_PUBL) {
u32 mask = ((struct sockaddr_in *) &r->arp_netmask)->sin_addr.s_addr; u32 mask =
((struct sockaddr_in *)&r->arp_netmask)->sin_addr.s_addr;
if (mask == 0xFFFFFFFF) if (mask == 0xFFFFFFFF)
return pneigh_delete(&arp_tbl, &ip, dev); return pneigh_delete(&arp_tbl, &ip, dev);
if (mask == 0) { if (mask == 0) {
...@@ -1027,9 +1000,9 @@ int arp_ioctl(unsigned int cmd, void *arg) ...@@ -1027,9 +1000,9 @@ int arp_ioctl(unsigned int cmd, void *arg)
{ {
int err; int err;
struct arpreq r; struct arpreq r;
struct net_device * dev = NULL; struct net_device *dev = NULL;
switch(cmd) { switch (cmd) {
case SIOCDARP: case SIOCDARP:
case SIOCSARP: case SIOCSARP:
if (!capable(CAP_NET_ADMIN)) if (!capable(CAP_NET_ADMIN))
...@@ -1050,8 +1023,8 @@ int arp_ioctl(unsigned int cmd, void *arg) ...@@ -1050,8 +1023,8 @@ int arp_ioctl(unsigned int cmd, void *arg)
(r.arp_flags & (ATF_NETMASK|ATF_DONTPUB))) (r.arp_flags & (ATF_NETMASK|ATF_DONTPUB)))
return -EINVAL; return -EINVAL;
if (!(r.arp_flags & ATF_NETMASK)) if (!(r.arp_flags & ATF_NETMASK))
((struct sockaddr_in *)&r.arp_netmask)->sin_addr.s_addr=__constant_htonl(0xFFFFFFFFUL); ((struct sockaddr_in *)&r.arp_netmask)->sin_addr.s_addr =
htonl(0xFFFFFFFFUL);
rtnl_lock(); rtnl_lock();
if (r.arp_dev[0]) { if (r.arp_dev[0]) {
err = -ENODEV; err = -ENODEV;
...@@ -1091,7 +1064,10 @@ int arp_ioctl(unsigned int cmd, void *arg) ...@@ -1091,7 +1064,10 @@ int arp_ioctl(unsigned int cmd, void *arg)
* Write the contents of the ARP cache to a PROCfs file. * Write the contents of the ARP cache to a PROCfs file.
*/ */
#ifndef CONFIG_PROC_FS #ifndef CONFIG_PROC_FS
static int arp_get_info(char *buffer, char **start, off_t offset, int length) { return 0; } static int arp_get_info(char *buffer, char **start, off_t offset, int length)
{
return 0;
}
#else #else
#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
static char *ax2asc2(ax25_address *a, char *buf); static char *ax2asc2(ax25_address *a, char *buf);
...@@ -1100,70 +1076,57 @@ static char *ax2asc2(ax25_address *a, char *buf); ...@@ -1100,70 +1076,57 @@ static char *ax2asc2(ax25_address *a, char *buf);
static int arp_get_info(char *buffer, char **start, off_t offset, int length) static int arp_get_info(char *buffer, char **start, off_t offset, int length)
{ {
int len=0;
off_t pos=0;
int size;
char hbuffer[HBUFFERLEN]; char hbuffer[HBUFFERLEN];
int i,j,k; int i,j,k;
const char hexbuf[] = "0123456789ABCDEF"; const char hexbuf[] = "0123456789ABCDEF";
int size = sprintf(buffer, "IP address HW type Flags "
"HW address Mask Device\n");
int len = size;
off_t pos = size;
size = sprintf(buffer,"IP address HW type Flags HW address Mask Device\n"); for (i = 0; i <= NEIGH_HASHMASK; i++) {
pos+=size;
len+=size;
for(i=0; i<=NEIGH_HASHMASK; i++) {
struct neighbour *n; struct neighbour *n;
read_lock_bh(&arp_tbl.lock); read_lock_bh(&arp_tbl.lock);
for (n=arp_tbl.hash_buckets[i]; n; n=n->next) { for (n = arp_tbl.hash_buckets[i]; n; n = n->next) {
char tbuf[16];
struct net_device *dev = n->dev; struct net_device *dev = n->dev;
int hatype = dev->type; int hatype = dev->type;
/* Do not confuse users "arp -a" with magic entries */ /* Do not confuse users "arp -a" with magic entries */
if (!(n->nud_state&~NUD_NOARP)) if (!(n->nud_state & ~NUD_NOARP))
continue; continue;
read_lock(&n->lock); read_lock(&n->lock);
/* Convert hardware address to XX:XX:XX:XX ... form. */
/*
* Convert hardware address to XX:XX:XX:XX ... form.
*/
#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
if (hatype == ARPHRD_AX25 || hatype == ARPHRD_NETROM) if (hatype == ARPHRD_AX25 || hatype == ARPHRD_NETROM)
ax2asc2((ax25_address *)n->ha, hbuffer); ax2asc2((ax25_address *)n->ha, hbuffer);
else { else {
#endif #endif
for (k=0,j=0;k<HBUFFERLEN-3 && j<dev->addr_len;j++) { for (k = 0, j = 0; k < HBUFFERLEN - 3 &&
hbuffer[k++]=hexbuf[(n->ha[j]>>4)&15 ]; j < dev->addr_len; j++) {
hbuffer[k++]=hexbuf[n->ha[j]&15 ]; hbuffer[k++] = hexbuf[(n->ha[j] >> 4) & 15];
hbuffer[k++]=':'; hbuffer[k++] = hexbuf[n->ha[j] & 15];
hbuffer[k++] = ':';
} }
hbuffer[--k]=0; hbuffer[--k] = 0;
#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
} }
#endif #endif
sprintf(tbuf, "%u.%u.%u.%u",
{ NIPQUAD(*(u32*)n->primary_key));
char tbuf[16]; size = sprintf(buffer + len, "%-16s 0x%-10x0x%-10x%s"
sprintf(tbuf, "%u.%u.%u.%u", NIPQUAD(*(u32*)n->primary_key));
size = sprintf(buffer+len, "%-16s 0x%-10x0x%-10x%s"
" * %s\n", " * %s\n",
tbuf, tbuf, hatype, arp_state_to_flags(n),
hatype, hbuffer, dev->name);
arp_state_to_flags(n),
hbuffer,
dev->name);
}
read_unlock(&n->lock); read_unlock(&n->lock);
len += size; len += size;
pos += size; pos += size;
if (pos <= offset) if (pos <= offset)
len=0; len = 0;
if (pos >= offset+length) { if (pos >= offset + length) {
read_unlock_bh(&arp_tbl.lock); read_unlock_bh(&arp_tbl.lock);
goto done; goto done;
} }
...@@ -1171,41 +1134,32 @@ static int arp_get_info(char *buffer, char **start, off_t offset, int length) ...@@ -1171,41 +1134,32 @@ static int arp_get_info(char *buffer, char **start, off_t offset, int length)
read_unlock_bh(&arp_tbl.lock); read_unlock_bh(&arp_tbl.lock);
} }
for (i=0; i<=PNEIGH_HASHMASK; i++) { for (i = 0; i <= PNEIGH_HASHMASK; i++) {
struct pneigh_entry *n; struct pneigh_entry *n;
for (n=arp_tbl.phash_buckets[i]; n; n=n->next) { for (n = arp_tbl.phash_buckets[i]; n; n = n->next) {
struct net_device *dev = n->dev; struct net_device *dev = n->dev;
int hatype = dev ? dev->type : 0; int hatype = dev ? dev->type : 0;
{
char tbuf[16]; char tbuf[16];
sprintf(tbuf, "%u.%u.%u.%u", NIPQUAD(*(u32*)n->key)); sprintf(tbuf, "%u.%u.%u.%u", NIPQUAD(*(u32*)n->key));
size = sprintf(buffer+len, "%-16s 0x%-10x0x%-10x%s" size = sprintf(buffer + len, "%-16s 0x%-10x0x%-10x%s"
" * %s\n", " * %s\n",
tbuf, tbuf, hatype, ATF_PUBL | ATF_PERM,
hatype,
ATF_PUBL|ATF_PERM,
"00:00:00:00:00:00", "00:00:00:00:00:00",
dev ? dev->name : "*"); dev ? dev->name : "*");
}
len += size; len += size;
pos += size; pos += size;
if (pos <= offset) if (pos <= offset)
len=0; len = 0;
if (pos >= offset+length) if (pos >= offset+length)
goto done; goto done;
} }
} }
done: *start = buffer + len - (pos - offset); /* Start of wanted data */
done: len = pos - offset; /* Start slop */
if (len > length)
*start = buffer+len-(pos-offset); /* Start of wanted data */
len = pos-offset; /* Start slop */
if (len>length)
len = length; /* Ending slop */ len = length; /* Ending slop */
if (len<0) if (len < 0)
len = 0; len = 0;
return len; return len;
} }
...@@ -1240,7 +1194,8 @@ void __init arp_init (void) ...@@ -1240,7 +1194,8 @@ void __init arp_init (void)
proc_net_create ("arp", 0, arp_get_info); proc_net_create ("arp", 0, arp_get_info);
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
neigh_sysctl_register(NULL, &arp_tbl.parms, NET_IPV4, NET_IPV4_NEIGH, "ipv4"); neigh_sysctl_register(NULL, &arp_tbl.parms, NET_IPV4,
NET_IPV4_NEIGH, "ipv4");
#endif #endif
} }
......
...@@ -9,11 +9,13 @@ ...@@ -9,11 +9,13 @@
O_TARGET := ipv6.o O_TARGET := ipv6.o
export-objs := ipv6_syms.o
obj-y := af_inet6.o ip6_output.o ip6_input.o addrconf.o sit.o \ obj-y := af_inet6.o ip6_output.o ip6_input.o addrconf.o sit.o \
route.o ip6_fib.o ipv6_sockglue.o ndisc.o udp.o raw.o \ route.o ip6_fib.o ipv6_sockglue.o ndisc.o udp.o raw.o \
protocol.o icmp.o mcast.o reassembly.o tcp_ipv6.o \ protocol.o icmp.o mcast.o reassembly.o tcp_ipv6.o \
exthdrs.o sysctl_net_ipv6.o datagram.o proc.o \ exthdrs.o sysctl_net_ipv6.o datagram.o proc.o \
ip6_flowlabel.o ip6_flowlabel.o ipv6_syms.o
obj-m := $(O_TARGET) obj-m := $(O_TARGET)
......
#include <linux/module.h>
#include <net/ipv6.h>
#include <net/addrconf.h>
#include <net/ip6_route.h>
EXPORT_SYMBOL(ipv6_addr_type);
EXPORT_SYMBOL(icmpv6_send);
EXPORT_SYMBOL(ndisc_mc_map);
EXPORT_SYMBOL(register_inet6addr_notifier);
EXPORT_SYMBOL(unregister_inet6addr_notifier);
EXPORT_SYMBOL(ip6_route_output);
...@@ -286,15 +286,6 @@ EXPORT_SYMBOL(dlci_ioctl_hook); ...@@ -286,15 +286,6 @@ EXPORT_SYMBOL(dlci_ioctl_hook);
#endif #endif
#ifdef CONFIG_IPV6
EXPORT_SYMBOL(ipv6_addr_type);
EXPORT_SYMBOL(icmpv6_send);
EXPORT_SYMBOL(ndisc_mc_map);
EXPORT_SYMBOL(register_inet6addr_notifier);
EXPORT_SYMBOL(unregister_inet6addr_notifier);
#include <net/ip6_route.h>
EXPORT_SYMBOL(ip6_route_output);
#endif
#if defined (CONFIG_IPV6_MODULE) || defined (CONFIG_KHTTPD) || defined (CONFIG_KHTTPD_MODULE) #if defined (CONFIG_IPV6_MODULE) || defined (CONFIG_KHTTPD) || defined (CONFIG_KHTTPD_MODULE)
/* inet functions common to v4 and v6 */ /* inet functions common to v4 and v6 */
EXPORT_SYMBOL(inet_release); EXPORT_SYMBOL(inet_release);
...@@ -401,11 +392,6 @@ EXPORT_SYMBOL(sysctl_tcp_tw_recycle); ...@@ -401,11 +392,6 @@ EXPORT_SYMBOL(sysctl_tcp_tw_recycle);
EXPORT_SYMBOL(sysctl_max_syn_backlog); EXPORT_SYMBOL(sysctl_max_syn_backlog);
#endif #endif
#if defined (CONFIG_IPV6_MODULE)
EXPORT_SYMBOL(secure_tcpv6_sequence_number);
EXPORT_SYMBOL(secure_ipv6_id);
#endif
#endif #endif
EXPORT_SYMBOL(tcp_read_sock); EXPORT_SYMBOL(tcp_read_sock);
......
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