Changeset View
Changeset View
Standalone View
Standalone View
head/sys/net/rtsock.c
Show First 20 Lines • Show All 668 Lines • ▼ Show 20 Lines | if (info.rti_info[RTAX_GATEWAY] != NULL && | ||||
} | } | ||||
} | } | ||||
switch (rtm->rtm_type) { | switch (rtm->rtm_type) { | ||||
struct rtentry *saved_nrt; | struct rtentry *saved_nrt; | ||||
case RTM_ADD: | case RTM_ADD: | ||||
case RTM_CHANGE: | case RTM_CHANGE: | ||||
if (rtm->rtm_type == RTM_ADD) { | |||||
if (info.rti_info[RTAX_GATEWAY] == NULL) | if (info.rti_info[RTAX_GATEWAY] == NULL) | ||||
senderr(EINVAL); | senderr(EINVAL); | ||||
} | |||||
saved_nrt = NULL; | saved_nrt = NULL; | ||||
/* support for new ARP code */ | /* support for new ARP code */ | ||||
if (info.rti_info[RTAX_GATEWAY]->sa_family == AF_LINK && | if (info.rti_info[RTAX_GATEWAY] != NULL && | ||||
info.rti_info[RTAX_GATEWAY]->sa_family == AF_LINK && | |||||
(rtm->rtm_flags & RTF_LLDATA) != 0) { | (rtm->rtm_flags & RTF_LLDATA) != 0) { | ||||
error = lla_rt_output(rtm, &info); | error = lla_rt_output(rtm, &info); | ||||
#ifdef INET6 | #ifdef INET6 | ||||
if (error == 0) | if (error == 0) | ||||
rti_need_deembed = (V_deembed_scopeid) ? 1 : 0; | rti_need_deembed = (V_deembed_scopeid) ? 1 : 0; | ||||
#endif | #endif | ||||
break; | break; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,277 Lines • Show Last 20 Lines |