--- ax25.c.old Thu Feb 10 20:41:35 1994 +++ ax25.c Thu Feb 10 22:06:04 1994 @@ -21,6 +21,8 @@ * AX.25 008 Alan(GW4PTS) Cleaned up, fixed a few state machine problems, added callbacks * AX.25 009 Alan(GW4PTS) Emergency patch kit to fix memory corruption * AX.25 010 Alan(GW4PTS) Added RAW sockets/Digipeat. + * AX.25 011 Alan(GW4PTS) RAW socket and datagram fixes (thanks) - Raw sendto now gets PID right + * datagram sendto uses correct target address. * * To do: * Support use as digipeater, including an on/off ioctl @@ -1245,7 +1247,7 @@ } /* Build an AX.25 header */ *asmptr++=0; /* KISS data */ - asmptr+=(lv=build_ax25_addr(asmptr,&sk->ax25_source_addr,&sk->ax25_dest_addr,dp,C_COMMAND)); + asmptr+=(lv=build_ax25_addr(asmptr,&sk->ax25_source_addr,&sax.sax25_call,dp,C_COMMAND)); if(sk->debug) printk("Built header (%d bytes).\n",lv); skb->h.raw=asmptr; @@ -1253,7 +1255,10 @@ if(sk->debug) printk("base=%p pos=%p\n",(unsigned char *)(skb+1),asmptr); *asmptr++=LAPB_UI; /* Datagram - will get replaced for I frames */ - *asmptr++=PID_AX25; /* Raw AX.25 */ + if(sk->type!=SOCK_RAW) + *asmptr++=PID_AX25; /* AX.25 */ + else + *asmptr++=sk->protocol; /* AX.25 raw */ if(sk->debug) printk("AX.25: Appending user data.\n"); @@ -1476,7 +1481,7 @@ (void) sock_register(ax25_proto_ops.family, &ax25_proto_ops); - printk("GW4PTS AX.25 for Linux 0.10 ALPHA for Linux 0.99.15\n"); + printk("GW4PTS AX.25 for Linux 0.11 ALPHA for Linux 0.99.15\n"); printk("Portions (c) Copyright 1984 University Of British Columbia\n"); printk("Portions (c) Copyright 1990 The Regents of the University Of California\n");