From 6f3dbe5e1ac47817ca424b1e34f44443b2e088ec Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Tue, 25 Jan 2000 12:24:06 +0000 Subject: [PATCH] Now that kernel is capable of notifying user processes about the interface MTU change (src/sys/net/if_sl.c,v 1.83), track interface MTU with -dynamic option as well. PR: 15494 --- sbin/natd/natd.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/sbin/natd/natd.c b/sbin/natd/natd.c index 3d6c856a8ace..09cd257ed21c 100644 --- a/sbin/natd/natd.c +++ b/sbin/natd/natd.c @@ -640,16 +640,14 @@ static void HandleRoutingInfo (int fd) } if (verbose) - printf ("Routing message %X received.\n", ifMsg.ifm_type); + printf ("Routing message %#x received.\n", ifMsg.ifm_type); - if (ifMsg.ifm_type != RTM_NEWADDR) - return; - - if (verbose && ifMsg.ifm_index == ifIndex) - printf ("Interface address has changed.\n"); - - if (ifMsg.ifm_index == ifIndex) + if ((ifMsg.ifm_type == RTM_NEWADDR || ifMsg.ifm_type == RTM_IFINFO) && + ifMsg.ifm_index == ifIndex) { + if (verbose) + printf("Interface address/MTU has probably changed.\n"); assignAliasAddr = 1; + } } static void PrintPacket (struct ip* ip)