patch sys/netatalk/aarp.c byte order

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

patch sys/netatalk/aarp.c byte order

Ian McWilliam
This fix comes from NetBSD pr/31051

  Modified Files:
  src/sys/netatalk: aarp.c

  Log Message:
  PR/31051: Kousaku Nakahara: can't find the device from Macintosh  
through
  AppleTalk(Netatalk) in the network including a seed router
  Byte order problem, fixed as suggested.

Ian McWilliam


Index: aarp.c
===================================================================
RCS file: /cvs/src/sys/netatalk/aarp.c,v
retrieving revision 1.6
diff -u -r1.6 aarp.c
--- aarp.c 2006/03/04 22:40:16 1.6
+++ aarp.c 2006/03/24 10:06:45
@@ -176,8 +176,8 @@
        }
        nr = (struct netrange *)(sat2->sat_zero);
        if( (nr->nr_phase == 2 )
- && (nr->nr_firstnet <= sat->sat_addr.s_net)
- && (nr->nr_lastnet >= sat->sat_addr.s_net)) {
+ && (ntohs(nr->nr_firstnet) <= ntohs(sat->sat_addr.s_net))
+ && (ntohs(nr->nr_lastnet) >= ntohs(sat->sat_addr.s_net))) {
            break;
        }
      }