Permalink
Browse files

Don't set hopcount of kernel routes on BSD.

Hopcount a kernel priority have nothing in common.
  • Loading branch information...
1 parent ad8cf85 commit 3d6d8da24f1ee54b33fff46ade8961dfd185a9cd @jech committed Dec 31, 2009
Showing with 1 addition and 3 deletions.
  1. +1 −3 kernel_socket.c
View
@@ -393,8 +393,6 @@ kernel_route(int operation, const unsigned char *dest, unsigned short plen,
if(!(operation == ROUTE_MODIFY && plen == 128)) {
rtm->rtm_addrs |= RTA_NETMASK;
}
- rtm->rtm_rmx.rmx_hopcount = metric;
- rtm->rtm_inits = RTV_HOPCOUNT;
sin6 = (struct sockaddr_in6 *)&msg[sizeof(struct rt_msghdr)];
/* Destination */
@@ -462,7 +460,7 @@ parse_kernel_route(const struct rt_msghdr *rtm, struct kernel_route *route)
char addr[INET6_ADDRSTRLEN];
memset(route, 0, sizeof(*route));
- route->metric = rtm->rtm_rmx.rmx_hopcount;
+ route->metric = 0;
route->ifindex = rtm->rtm_index;
if(!rtm->rtm_addrs && RTA_DST)

0 comments on commit 3d6d8da

Please sign in to comment.