diff options
| author | Roy Marples <roy@marples.name> | 2008-03-29 16:50:18 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-03-29 16:50:18 +0000 |
| commit | c910d0d0a84907051c6436c9fef97e30b2aec212 (patch) | |
| tree | 43ba250487d191ec6c6bfcdd4081d05fe91f121b /if-bsd.c | |
| parent | b4fb54de2c7813d375b4623db290cf43791e3752 (diff) | |
| download | dhcpcd-c910d0d0a84907051c6436c9fef97e30b2aec212.tar.xz | |
Remove all logging from if.c and into the proper bits.
Diffstat (limited to 'if-bsd.c')
| -rw-r--r-- | if-bsd.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -96,7 +96,7 @@ if_address(const char *ifname, struct in_addr address, int if_route(const char *ifname, struct in_addr destination, struct in_addr netmask, struct in_addr gateway, - int metric, int change, int del) + int metric, int action) { int s; static int seq; @@ -126,7 +126,12 @@ if_route(const char *ifname, struct in_addr destination, memset(&rtm, 0, sizeof(rtm)); rtm.hdr.rtm_version = RTM_VERSION; rtm.hdr.rtm_seq = ++seq; - rtm.hdr.rtm_type = change ? RTM_CHANGE : del ? RTM_DELETE : RTM_ADD; + if (action == 0) + rtm.hdr.rtm_type = RTM_CHANGE; + else if (action > 0) + rtm.hdr.rtm_type = RTM_ADD; + else + rtm.hdr.rtm_type = RTM_DELETE; rtm.hdr.rtm_flags = RTF_UP | RTF_STATIC; /* This order is important */ |
