Skip to content

Commit

Permalink
Rename interface_up to interface_updown.
Browse files Browse the repository at this point in the history
As suggested by Christof Schulze.
  • Loading branch information
jech committed Aug 4, 2019
1 parent e8bf403 commit c6f3a28
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions babeld.c
Expand Up @@ -805,7 +805,7 @@ main(int argc, char **argv)
usleep(roughly(10000));
gettime(&now);

/* We need to flush so interface_up won't try to reinstall. */
/* We need to flush so interface_updown won't try to reinstall. */
flush_all_routes();

FOR_ALL_INTERFACES(ifp) {
Expand All @@ -828,7 +828,7 @@ main(int argc, char **argv)
flushbuf(&ifp->buf, ifp);
usleep(roughly(10000));
gettime(&now);
interface_up(ifp, 0);
interface_updown(ifp, 0);
}
release_tables();
kernel_setup_socket(0);
Expand Down Expand Up @@ -885,7 +885,7 @@ main(int argc, char **argv)
FOR_ALL_INTERFACES(ifp) {
if(!if_up(ifp))
continue;
interface_up(ifp, 0);
interface_updown(ifp, 0);
}
kernel_setup_socket(0);
kernel_setup(0);
Expand Down
10 changes: 5 additions & 5 deletions interface.c
Expand Up @@ -109,7 +109,7 @@ flush_interface(char *ifname)
if(ifp == NULL)
return 0;

interface_up(ifp, 0);
interface_updown(ifp, 0);
if(prev)
prev->next = ifp->next;
else
Expand Down Expand Up @@ -271,7 +271,7 @@ check_link_local_addresses(struct interface *ifp)
}

int
interface_up(struct interface *ifp, int up)
interface_updown(struct interface *ifp, int up)
{
int mtu, rc, type;
struct ipv6_mreq mreq;
Expand Down Expand Up @@ -519,7 +519,7 @@ interface_up(struct interface *ifp, int up)

fail:
assert(up);
interface_up(ifp, 0);
interface_updown(ifp, 0);
local_notify_interface(ifp, LOCAL_CHANGE);
return -1;
}
Expand Down Expand Up @@ -550,7 +550,7 @@ check_interfaces(void)
ifindex = if_nametoindex(ifp->name);
if(ifindex != ifp->ifindex) {
debugf("Noticed ifindex change for %s.\n", ifp->name);
interface_up(ifp, 0);
interface_updown(ifp, 0);
ifp->ifindex = ifindex;
ifindex_changed = 1;
}
Expand All @@ -561,7 +561,7 @@ check_interfaces(void)
rc = 0;
if((rc > 0) != if_up(ifp)) {
debugf("Noticed status change for %s.\n", ifp->name);
interface_up(ifp, rc > 0);
interface_updown(ifp, rc > 0);
}

if(if_up(ifp)) {
Expand Down
2 changes: 1 addition & 1 deletion interface.h
Expand Up @@ -151,6 +151,6 @@ int flush_interface(char *ifname);
unsigned jitter(struct buffered *buf, int urgent);
unsigned update_jitter(struct interface *ifp, int urgent);
void set_timeout(struct timeval *timeout, int msecs);
int interface_up(struct interface *ifp, int up);
int interface_updown(struct interface *ifp, int up);
int interface_ll_address(struct interface *ifp, const unsigned char *address);
void check_interfaces(void);

0 comments on commit c6f3a28

Please sign in to comment.