diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-03-17 22:05:47 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-03-17 22:05:47 +0000 |
commit | 27cfca1ec98e91261b1a5355d10a8996464b63af (patch) | |
tree | 8e895a53e372fa682b4c0a585b9377d67ed70d0e /net/wanrouter | |
parent | 6a76fb7214c477ccf6582bd79c5b4ccc4f9c41b1 (diff) |
Look Ma' what I found on my harddisk ...
o New faster syscalls for 2.1.x, too
o Upgrade to 2.1.89.
Don't try to run this. It's flaky as hell. But feel free to debug ...
Diffstat (limited to 'net/wanrouter')
-rw-r--r-- | net/wanrouter/.cvsignore | 1 | ||||
-rw-r--r-- | net/wanrouter/wanmain.c | 11 | ||||
-rw-r--r-- | net/wanrouter/wanproc.c | 6 |
3 files changed, 13 insertions, 5 deletions
diff --git a/net/wanrouter/.cvsignore b/net/wanrouter/.cvsignore index 4671378ae..857dd22e9 100644 --- a/net/wanrouter/.cvsignore +++ b/net/wanrouter/.cvsignore @@ -1 +1,2 @@ .depend +.*.flags diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c index 66b99dedc..f92ac29bb 100644 --- a/net/wanrouter/wanmain.c +++ b/net/wanrouter/wanmain.c @@ -18,6 +18,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * ============================================================================ +* Oct 15, 1997 Farhan Thawar changed wan_encapsulate to add a pad byte of 0 * Jun 27, 1997 Alan Cox realigned with vendor code * Jan 16, 1997 Gene Kozin router_devlist made public * Jan 31, 1997 Alan Cox Hacked it about a bit for 2.1 @@ -26,7 +27,6 @@ #include <linux/stddef.h> /* offsetof(), etc. */ #include <linux/errno.h> /* return codes */ -#include <linux/config.h> /* OS configuration options */ #include <linux/kernel.h> #include <linux/module.h> /* support for loadable modules */ #include <linux/malloc.h> /* kmalloc(), kfree() */ @@ -79,8 +79,10 @@ static int delete_interface (wan_device_t* wandev, char* name, int forse); * Global Data */ +#ifdef MODULE static char fullname[] = "WAN Router"; static char copyright[] = "(c) 1995-1997 Sangoma Technologies Inc."; +#endif static char modname[] = ROUTER_NAME; /* short module name */ wan_device_t * router_devlist = NULL; /* list of registered devices */ static int devcnt = 0; @@ -90,7 +92,9 @@ static int devcnt = 0; */ static unsigned char oui_ether[] = { 0x00, 0x00, 0x00 }; +#if 0 static unsigned char oui_802_2[] = { 0x00, 0x80, 0xC2 }; +#endif #ifdef MODULE @@ -279,9 +283,10 @@ int wanrouter_encapsulate (struct sk_buff* skb, struct device* dev) case ETH_P_IPX: /* SNAP encapsulation */ case ETH_P_ARP: - hdr_len += 6; + hdr_len += 7; skb_push(skb, 6); - skb->data[0] = NLPID_SNAP; + skb->data[0] = 0; + skb->data[1] = NLPID_SNAP; memcpy(&skb->data[1], oui_ether, sizeof(oui_ether)); *((unsigned short*)&skb->data[4]) = htons(skb->protocol); break; diff --git a/net/wanrouter/wanproc.c b/net/wanrouter/wanproc.c index 937c50076..088487077 100644 --- a/net/wanrouter/wanproc.c +++ b/net/wanrouter/wanproc.c @@ -56,7 +56,7 @@ typedef struct wan_stat_entry /****** Function Prototypes *************************************************/ /* Proc filesystem interface */ -static int router_proc_perms (struct inode*, int); +static int router_proc_perms(struct inode *, int); static ssize_t router_proc_read(struct file* file, char* buf, size_t count, loff_t *ppos); /* Methods for preparing data for reading proc entries */ @@ -118,6 +118,7 @@ static struct inode_operations router_inode = NULL, /* rmdir */ NULL, /* mknod */ NULL, /* rename */ + NULL, /* follow link */ NULL, /* readlink */ NULL, /* readpage */ NULL, /* writepage */ @@ -157,6 +158,7 @@ static struct inode_operations wandev_inode = NULL, /* mknod */ NULL, /* rename */ NULL, /* readlink */ + NULL, /* follow_link */ NULL, /* readpage */ NULL, /* writepage */ NULL, /* bmap */ @@ -339,7 +341,7 @@ static int router_proc_perms (struct inode* inode, int op) static ssize_t router_proc_read(struct file* file, char* buf, size_t count, loff_t *ppos) { - struct inode *inode; + struct inode *inode = file->f_dentry->d_inode; struct proc_dir_entry* dent; char* page; int pos, offs, len; |