mars-nwe/examples/kpatch1.3.56

33 lines
1.1 KiB
Plaintext
Raw Normal View History

2011-11-13 00:38:55 +01:00
--- ORG/af_ipx.c Sat Jan 6 13:54:59 1996
+++ af_ipx.c Thu Jan 11 14:36:21 1996
@@ -994,7 +994,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 +1110,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);