patch-2.3.15 linux/net/netrom/nr_route.c
Next file: linux/net/netsyms.c
Previous file: linux/net/netrom/af_netrom.c
Back to the patch index
Back to the overall index
- Lines: 58
- Date:
Mon Aug 23 10:01:02 1999
- Orig file:
v2.3.14/linux/net/netrom/nr_route.c
- Orig date:
Wed Aug 18 11:38:49 1999
diff -u --recursive --new-file v2.3.14/linux/net/netrom/nr_route.c linux/net/netrom/nr_route.c
@@ -47,7 +47,7 @@
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/notifier.h>
-#include <linux/firewall.h>
+#include <linux/netfilter.h>
#include <net/netrom.h>
static unsigned int nr_neigh_no = 1;
@@ -548,12 +548,13 @@
{
struct net_device *dev;
- if ((dev = dev_get(devname)) == NULL)
+ if ((dev = dev_get_by_name(devname)) == NULL)
return NULL;
if ((dev->flags & IFF_UP) && dev->type == ARPHRD_AX25)
return dev;
+ dev_put(dev);
return NULL;
}
@@ -584,8 +585,10 @@
read_lock(&dev_base_lock);
for (dev = dev_base; dev != NULL; dev = dev->next) {
- if ((dev->flags & IFF_UP) && dev->type == ARPHRD_NETROM && ax25cmp(addr, (ax25_address *)dev->dev_addr) == 0)
+ if ((dev->flags & IFF_UP) && dev->type == ARPHRD_NETROM && ax25cmp(addr, (ax25_address *)dev->dev_addr) == 0) {
+ dev_hold(dev);
goto out;
+ }
}
out:
read_unlock(&dev_base_lock);
@@ -706,11 +709,6 @@
struct net_device *dev;
unsigned char *dptr;
- if (ax25 != NULL && call_in_firewall(PF_NETROM, skb->dev, skb->data, NULL, &skb) != FW_ACCEPT)
- return 0;
-
- if (ax25 == NULL && call_out_firewall(PF_NETROM, skb->dev, skb->data, NULL, &skb) != FW_ACCEPT)
- return 0;
nr_src = (ax25_address *)(skb->data + 0);
nr_dest = (ax25_address *)(skb->data + 7);
@@ -743,9 +741,6 @@
nr_neigh = nr_node->routes[nr_node->which].neighbour;
if ((dev = nr_dev_first()) == NULL)
- return 0;
-
- if (ax25 != NULL && call_fw_firewall(PF_NETROM, skb->dev, skb->data, NULL, &skb) != FW_ACCEPT)
return 0;
dptr = skb_push(skb, 1);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)