diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2001-03-09 20:33:35 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2001-03-09 20:33:35 +0000 |
commit | 116674acc97ba75a720329996877077d988443a2 (patch) | |
tree | 6a3f2ff0b612ae2ee8a3f3509370c9e6333a53b3 /net/ax25 | |
parent | 71118c319fcae4a138f16e35b4f7e0a6d53ce2ca (diff) |
Merge with Linux 2.4.2.
Diffstat (limited to 'net/ax25')
-rw-r--r-- | net/ax25/Makefile | 2 | ||||
-rw-r--r-- | net/ax25/af_ax25.c | 26 | ||||
-rw-r--r-- | net/ax25/ax25_in.c | 4 | ||||
-rw-r--r-- | net/ax25/sysctl_net_ax25.c | 4 |
4 files changed, 16 insertions, 20 deletions
diff --git a/net/ax25/Makefile b/net/ax25/Makefile index 379185077..5974031f4 100644 --- a/net/ax25/Makefile +++ b/net/ax25/Makefile @@ -23,5 +23,3 @@ obj-$(CONFIG_SYSCTL) += sysctl_net_ax25.o include $(TOPDIR)/Rules.make -tar: - tar -cvf /dev/f1 . diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index b73b4e5f2..4a2684ebe 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c @@ -1782,10 +1782,9 @@ static int ax25_get_info(char *buffer, char **start, off_t offset, int length) return(len); } -static struct net_proto_family ax25_family_ops = -{ - PF_AX25, - ax25_create +static struct net_proto_family ax25_family_ops = { + family: PF_AX25, + create: ax25_create, }; static struct proto_ops SOCKOPS_WRAPPED(ax25_proto_ops) = { @@ -1814,18 +1813,13 @@ SOCKOPS_WRAP(ax25_proto, PF_AX25); /* * Called by socket.c on kernel start up */ -static struct packet_type ax25_packet_type = -{ - 0, /* MUTTER ntohs(ETH_P_AX25),*/ - 0, /* copy */ - ax25_kiss_rcv, - NULL, - NULL, +static struct packet_type ax25_packet_type = { + type: __constant_htons(ETH_P_AX25), + func: ax25_kiss_rcv, }; static struct notifier_block ax25_dev_notifier = { - ax25_device_event, - 0 + notifier_call: ax25_device_event, }; EXPORT_SYMBOL(ax25_encapsulate); @@ -1846,10 +1840,11 @@ EXPORT_SYMBOL(asc2ax); EXPORT_SYMBOL(null_ax25_address); EXPORT_SYMBOL(ax25_display_timer); +static const char banner[] __initdata = KERN_INFO "NET4: G4KLX/GW4PTS AX.25 for Linux. Version 0.37 for Linux NET4.0\n"; + static int __init ax25_init(void) { sock_register(&ax25_family_ops); - ax25_packet_type.type = htons(ETH_P_AX25); dev_add_pack(&ax25_packet_type); register_netdevice_notifier(&ax25_dev_notifier); ax25_register_sysctl(); @@ -1858,7 +1853,7 @@ static int __init ax25_init(void) proc_net_create("ax25", 0, ax25_get_info); proc_net_create("ax25_calls", 0, ax25_uid_get_info); - printk(KERN_INFO "NET4: G4KLX/GW4PTS AX.25 for Linux. Version 0.37 for Linux NET4.0\n"); + printk(banner); return 0; } module_init(ax25_init); @@ -1879,7 +1874,6 @@ static void __exit ax25_exit(void) ax25_unregister_sysctl(); unregister_netdevice_notifier(&ax25_dev_notifier); - ax25_packet_type.type = htons(ETH_P_AX25); dev_remove_pack(&ax25_packet_type); sock_unregister(PF_AX25); diff --git a/net/ax25/ax25_in.c b/net/ax25/ax25_in.c index ed5e6fbce..7c1484d6e 100644 --- a/net/ax25/ax25_in.c +++ b/net/ax25/ax25_in.c @@ -36,6 +36,7 @@ * AX.25 036 Jonathan(G4KLX) Move DAMA code into own file. * Joerg(DL1BKE) Fixed DAMA Slave. * AX.25 037 Jonathan(G4KLX) New timer architecture. + * Thomas(DL9SAU) Fixed missing initialization of skb->protocol. */ #include <linux/config.h> @@ -158,6 +159,7 @@ int ax25_rx_iframe(ax25_cb *ax25, struct sk_buff *skb) skb->nh.raw = skb->data; skb->dev = ax25->ax25_dev->dev; skb->pkt_type = PACKET_HOST; + skb->protocol = htons(ETH_P_IP); ip_rcv(skb, skb->dev, NULL); /* Wrong ptype */ return 1; } @@ -287,6 +289,7 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev, ax25_address *d skb->nh.raw = skb->data; skb->dev = dev; skb->pkt_type = PACKET_HOST; + skb->protocol = htons(ETH_P_IP); ip_rcv(skb, dev, ptype); /* Note ptype here is the wrong one, fix me later */ break; @@ -296,6 +299,7 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev, ax25_address *d skb->nh.raw = skb->data; skb->dev = dev; skb->pkt_type = PACKET_HOST; + skb->protocol = htons(ETH_P_ARP); arp_rcv(skb, dev, ptype); /* Note ptype here is wrong... */ break; #endif diff --git a/net/ax25/sysctl_net_ax25.c b/net/ax25/sysctl_net_ax25.c index c01ae329c..e6016f93d 100644 --- a/net/ax25/sysctl_net_ax25.c +++ b/net/ax25/sysctl_net_ax25.c @@ -27,8 +27,8 @@ static int min_ds_timeout[] = {0}, max_ds_timeout[] = {65535 * HZ}; static struct ctl_table_header *ax25_table_header; -static ctl_table *ax25_table = NULL; -static int ax25_table_size = 0; +static ctl_table *ax25_table; +static int ax25_table_size; static ctl_table ax25_dir_table[] = { {NET_AX25, "ax25", NULL, 0, 0555, NULL}, |