pud: only forward downlinked messages when the smart gateway system is enabled
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 10 Jan 2013 14:58:50 +0000 (15:58 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 10 Jan 2013 15:01:48 +0000 (16:01 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/pud/src/pud.c

index 13bac7e..66ea20e 100644 (file)
@@ -228,7 +228,8 @@ static void packetReceivedFromDownlink(int skfd, void *data __attribute__ ((unus
                        /* we now have a position update (olsrMessage) of a certain length
                         * (olsrMessageLength). this needs to be transmitted over OLSR and on the LAN */
 
-                       /* send out over OLSR interfaces */
+                       /* send out over OLSR interfaces (only when the smart gateway system is enabled) */
+                       if (olsr_cnf->smart_gw_active)
                        {
                                int r;
                                struct interface *ifn;