Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/ip_output.c
Show First 20 Lines • Show All 295 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
int nh_flags = nh->nh_flags; | int nh_flags = nh->nh_flags; | ||||
ro->ro_flags &= ~ (RT_REJECT|RT_BLACKHOLE|RT_HAS_GW); | ro->ro_flags &= ~ (RT_REJECT|RT_BLACKHOLE|RT_HAS_GW); | ||||
ro->ro_flags |= (nh_flags & NHF_REJECT) ? RT_REJECT : 0; | ro->ro_flags |= (nh_flags & NHF_REJECT) ? RT_REJECT : 0; | ||||
ro->ro_flags |= (nh_flags & NHF_BLACKHOLE) ? RT_BLACKHOLE : 0; | ro->ro_flags |= (nh_flags & NHF_BLACKHOLE) ? RT_BLACKHOLE : 0; | ||||
ro->ro_flags |= (nh_flags & NHF_GATEWAY) ? RT_HAS_GW : 0; | ro->ro_flags |= (nh_flags & NHF_GATEWAY) ? RT_HAS_GW : 0; | ||||
route_set_prepend_nh(ro, nh); | |||||
} | } | ||||
/* | /* | ||||
* IP output. The packet in mbuf chain m contains a skeletal IP | * IP output. The packet in mbuf chain m contains a skeletal IP | ||||
* header (with len, off, ttl, proto, tos, src, dst). | * header (with len, off, ttl, proto, tos, src, dst). | ||||
* The mbuf chain containing the packet will be freed. | * The mbuf chain containing the packet will be freed. | ||||
* The mbuf opt, if present, will not be freed. | * The mbuf opt, if present, will not be freed. | ||||
* If route ro is present and has ro_rt initialized, route lookup would be | * If route ro is present and has ro_rt initialized, route lookup would be | ||||
▲ Show 20 Lines • Show All 1,293 Lines • Show Last 20 Lines |