57 lines
1.7 KiB
Plaintext
57 lines
1.7 KiB
Plaintext
--- af_ipx.c Sat Jan 6 13:54:59 1996
|
|
+++ af_ipx.c Sun Jan 21 20:36:36 1996
|
|
@@ -507,8 +507,10 @@
|
|
/*
|
|
* Don't charge sender
|
|
*/
|
|
- if(skb->sk)
|
|
+ if(skb->sk) {
|
|
skb->sk->wmem_alloc-=skb->truesize;
|
|
+ skb->sk = NULL;
|
|
+ }
|
|
/*
|
|
* Will charge receiver
|
|
*/
|
|
@@ -519,8 +521,10 @@
|
|
*/
|
|
if (memcmp(ipx_broadcast_node, node, IPX_NODE_LEN) == 0)
|
|
{
|
|
- if (!send_to_wire && skb->sk)
|
|
+ if (!send_to_wire && skb->sk) {
|
|
skb->sk->wmem_alloc-=skb->truesize;
|
|
+ skb->sk = NULL;
|
|
+ }
|
|
ipxitf_demux_socket(intrfc, skb, send_to_wire);
|
|
if (!send_to_wire)
|
|
return 0;
|
|
@@ -994,7 +998,9 @@
|
|
return -EAGAIN;
|
|
rt->ir_next=ipx_routes;
|
|
ipx_routes=rt;
|
|
- }
|
|
+ } else if (intrfc == ipx_internal_net)
|
|
+ /* don't change an existing route to internal net (mars_nwe) */
|
|
+ return(0);
|
|
|
|
rt->ir_net = network;
|
|
rt->ir_intrfc = intrfc;
|
|
@@ -1108,9 +1114,15 @@
|
|
ipx->ipx_tctrl=0;
|
|
ipx->ipx_type=usipx->sipx_type;
|
|
skb->h.raw = (unsigned char *)ipx;
|
|
-
|
|
- ipx->ipx_source.net = sk->ipx_intrfc->if_netnum;
|
|
- memcpy(ipx->ipx_source.node, sk->ipx_intrfc->if_node, IPX_NODE_LEN);
|
|
+
|
|
+ if ((err = ntohs(sk->ipx_port)) == 0x453 || err == 0x452) {
|
|
+ /* RIP/SAP special handling for mars_nwe */
|
|
+ ipx->ipx_source.net = intrfc->if_netnum;
|
|
+ memcpy(ipx->ipx_source.node, intrfc->if_node, IPX_NODE_LEN);
|
|
+ } else {
|
|
+ ipx->ipx_source.net = sk->ipx_intrfc->if_netnum;
|
|
+ memcpy(ipx->ipx_source.node, sk->ipx_intrfc->if_node, IPX_NODE_LEN);
|
|
+ }
|
|
ipx->ipx_source.sock = sk->ipx_port;
|
|
ipx->ipx_dest.net=usipx->sipx_network;
|
|
memcpy(ipx->ipx_dest.node,usipx->sipx_node,IPX_NODE_LEN);
|