ip6_output.c (d053cf0d771f6547cb0537759a9af63cf402908d) ip6_output.c (b51cd7c834dba0ec9300337e16e5aa5bf65bd04c)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * IPv6 output functions
4 * Linux INET6 implementation
5 *
6 * Authors:
7 * Pedro Roque <roque@di.fc.ul.pt>
8 *

--- 1104 unchanged lines hidden (view full) ---

1113
1114 if (err == -ENETUNREACH)
1115 IP6_INC_STATS(net, NULL, IPSTATS_MIB_OUTNOROUTES);
1116 return err;
1117}
1118
1119/**
1120 * ip6_dst_lookup - perform route lookup on flow
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * IPv6 output functions
4 * Linux INET6 implementation
5 *
6 * Authors:
7 * Pedro Roque <roque@di.fc.ul.pt>
8 *

--- 1104 unchanged lines hidden (view full) ---

1113
1114 if (err == -ENETUNREACH)
1115 IP6_INC_STATS(net, NULL, IPSTATS_MIB_OUTNOROUTES);
1116 return err;
1117}
1118
1119/**
1120 * ip6_dst_lookup - perform route lookup on flow
1121 * @net: Network namespace to perform lookup in
1121 * @sk: socket which provides route info
1122 * @dst: pointer to dst_entry * for result
1123 * @fl6: flow to lookup
1124 *
1125 * This function performs a route lookup on the given flow.
1126 *
1127 * It returns zero on success, or a standard errno code on error.
1128 */
1129int ip6_dst_lookup(struct net *net, struct sock *sk, struct dst_entry **dst,
1130 struct flowi6 *fl6)
1131{
1132 *dst = NULL;
1133 return ip6_dst_lookup_tail(net, sk, dst, fl6);
1134}
1135EXPORT_SYMBOL_GPL(ip6_dst_lookup);
1136
1137/**
1138 * ip6_dst_lookup_flow - perform route lookup on flow with ipsec
1122 * @sk: socket which provides route info
1123 * @dst: pointer to dst_entry * for result
1124 * @fl6: flow to lookup
1125 *
1126 * This function performs a route lookup on the given flow.
1127 *
1128 * It returns zero on success, or a standard errno code on error.
1129 */
1130int ip6_dst_lookup(struct net *net, struct sock *sk, struct dst_entry **dst,
1131 struct flowi6 *fl6)
1132{
1133 *dst = NULL;
1134 return ip6_dst_lookup_tail(net, sk, dst, fl6);
1135}
1136EXPORT_SYMBOL_GPL(ip6_dst_lookup);
1137
1138/**
1139 * ip6_dst_lookup_flow - perform route lookup on flow with ipsec
1140 * @net: Network namespace to perform lookup in
1139 * @sk: socket which provides route info
1140 * @fl6: flow to lookup
1141 * @final_dst: final destination address for ipsec lookup
1142 *
1143 * This function performs a route lookup on the given flow.
1144 *
1145 * It returns a valid dst pointer on success, or a pointer encoded
1146 * error code.

--- 50 unchanged lines hidden (view full) ---

1197}
1198EXPORT_SYMBOL_GPL(ip6_sk_dst_lookup_flow);
1199
1200/**
1201 * ip6_dst_lookup_tunnel - perform route lookup on tunnel
1202 * @skb: Packet for which lookup is done
1203 * @dev: Tunnel device
1204 * @net: Network namespace of tunnel device
1141 * @sk: socket which provides route info
1142 * @fl6: flow to lookup
1143 * @final_dst: final destination address for ipsec lookup
1144 *
1145 * This function performs a route lookup on the given flow.
1146 *
1147 * It returns a valid dst pointer on success, or a pointer encoded
1148 * error code.

--- 50 unchanged lines hidden (view full) ---

1199}
1200EXPORT_SYMBOL_GPL(ip6_sk_dst_lookup_flow);
1201
1202/**
1203 * ip6_dst_lookup_tunnel - perform route lookup on tunnel
1204 * @skb: Packet for which lookup is done
1205 * @dev: Tunnel device
1206 * @net: Network namespace of tunnel device
1205 * @sk: Socket which provides route info
1207 * @sock: Socket which provides route info
1206 * @saddr: Memory to store the src ip address
1207 * @info: Tunnel information
1208 * @protocol: IP protocol
1208 * @saddr: Memory to store the src ip address
1209 * @info: Tunnel information
1210 * @protocol: IP protocol
1209 * @use_cahce: Flag to enable cache usage
1211 * @use_cache: Flag to enable cache usage
1210 * This function performs a route lookup on a tunnel
1211 *
1212 * It returns a valid dst pointer and stores src address to be used in
1213 * tunnel in param saddr on success, else a pointer encoded error code.
1214 */
1215
1216struct dst_entry *ip6_dst_lookup_tunnel(struct sk_buff *skb,
1217 struct net_device *dev,

--- 737 unchanged lines hidden ---
1212 * This function performs a route lookup on a tunnel
1213 *
1214 * It returns a valid dst pointer and stores src address to be used in
1215 * tunnel in param saddr on success, else a pointer encoded error code.
1216 */
1217
1218struct dst_entry *ip6_dst_lookup_tunnel(struct sk_buff *skb,
1219 struct net_device *dev,

--- 737 unchanged lines hidden ---