Skip to content

Commit cba68a4

Browse files
committed
Address revie comments.
1 parent a900878 commit cba68a4

2 files changed

Lines changed: 7 additions & 12 deletions

File tree

src/dhcp.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838

3939
#include <fcntl.h>
4040

41-
#include "src/priv.h"
42-
4341
#ifdef AF_LINK
4442
#include <net/if_dl.h>
4543
#endif
@@ -73,6 +71,7 @@
7371
#include "if.h"
7472
#include "logerr.h"
7573
#include "plugin.h"
74+
#include "priv.h"
7675

7776
#ifdef HAVE_CASPER
7877
#include <sys/capsicum.h>
@@ -1302,8 +1301,7 @@ dhcp_handlebootp(struct interface *ifp, struct bootp *bootp, size_t len,
13021301
break;
13031302
wanted = dhcp_lease_findaddr(ctx, &paddr);
13041303
if (wanted != NULL && !dhcp_lease_avail(lease, wanted, &now)) {
1305-
logwarnx(
1306-
"%s: plugin assigned address in-use: 0x%x %s",
1304+
logwarnx("%s: plugin assigned address in-use: 0x%x %s",
13071305
ifp->if_name, bootp->xid, inet_ntoa(paddr));
13081306
#if 0
13091307
paddr.s_addr = INADDR_ANY;
@@ -1665,12 +1663,8 @@ dhcp_readudp0(struct dhcp_ctx *ctx, int fd, unsigned short events)
16651663
bootp = ctx->dhcp_udp_buf;
16661664
ifp = if_findifpfromcmsg(ctx->dhcp_ctx, &msg, NULL);
16671665
if (ifp == NULL) {
1668-
/* This is a common situation for me when my tap
1669-
* interfaces come and go. */
1670-
#if 1
16711666
logwarnx("dhcp: interface not found 0x%x %s", bootp->xid,
16721667
inet_ntoa(from.sin_addr));
1673-
#endif
16741668
return;
16751669
}
16761670

src/route.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,18 @@ route_dispatch_ifinfo(struct link_ctx *lctx, struct rt_msghdr *rtm)
7373
if (ifp == NULL)
7474
return;
7575

76-
logwarnx("%s: interface is down", ifp->if_name);
76+
loginfox("%s: interface is down", ifp->if_name);
7777
TAILQ_REMOVE(ctx->ctx_ifaces, ifp, if_next);
7878
if_free(ifp);
7979
}
8080

8181
#ifdef RTM_IFANNOUNCE
8282
static void
83-
route_dispatch_ifannounce(struct link_ctx *lctx, const struct rt_msghdr *rtm)
83+
route_dispatch_ifannounce(struct link_ctx *lctx, const struct rt_msghdr *rtm)
8484
{
8585
struct ctx *ctx = lctx->link_ctx;
86-
const struct if_announcemsghdr *ifan = (const struct if_announcemsghdr *)rtm;
86+
const struct if_announcemsghdr *ifan =
87+
(const struct if_announcemsghdr *)rtm;
8788
struct interface *ifp;
8889

8990
if (rtm->rtm_msglen < sizeof(*ifan))
@@ -100,7 +101,7 @@ route_dispatch_ifannounce(struct link_ctx *lctx, const struct rt_msghdr *rtm)
100101
if (ifp == NULL)
101102
return;
102103

103-
logwarnx("%s: interface has departed", ifp->if_name);
104+
loginfox("%s: interface has departed", ifp->if_name);
104105
TAILQ_REMOVE(ctx->ctx_ifaces, ifp, if_next);
105106
if_free(ifp);
106107
}

0 commit comments

Comments
 (0)