| /linux/tools/testing/selftests/net/ |
| H A D | setup_veth.sh | |
| H A D | setup_loopback.sh | |
| H A D | lib.sh | 218 local ns_name="" 220 for ns_name in "$@"; do 222 if [ "${ns_name}" = "ns_name" ]; then 223 echo "Failed to setup namespace '${ns_name}': invalid name" 230 eval "${ns_name}=${ns_name,,}-$(mktemp -u XXXXXX)" 236 echo "Failed to create namespace $ns_name"
|
| H A D | pmtu.sh | 739 ns_name="$(nsname ${ns})" 741 ip -n "${ns_name}" route add "${addr}" table "${rt_table}" via "${gw}" 755 ns_name="$(nsname ${ns})" 757 ip -n ${ns_name} -${fam} nexthop add id ${nhid} via ${gw} dev ${dev} 769 ns_name="$(nsname ${ns})" 771 ip -n "${ns_name}" -"${fam}" route add "${addr}" table "${rt_table}" nhid "${nhid}" 788 ns_name="$(nsname ${ns})" 794 ip link add ${if} up netns ${ns_name} type veth peer name ${ifpeer} netns ${peer_name} || return 1 798 ip -n ${ns_name} addr add ${prefix4}.${segment}.1/24 dev ${if} 799 ip -n ${ns_name} add [all...] |
| /linux/security/apparmor/ |
| H A D | policy.c | 668 const char *name, *ns_name; in aa_fqlookupn_profile() local 671 name = aa_splitn_fqname(fqname, n, &ns_name, &ns_len); in aa_fqlookupn_profile() 672 if (ns_name) { in aa_fqlookupn_profile() 673 ns = aa_lookupn_ns(labels_ns(base), ns_name, ns_len); in aa_fqlookupn_profile() 863 const char *ns_name, const char *name, in audit_policy() argument 868 ad.iface.ns = ns_name; in audit_policy() 1188 const char *ns_name = NULL, *info = NULL; in aa_replace_profiles() local 1199 error = aa_unpack(udata, &lh, &ns_name, compressed_profile, compressed_size); in aa_replace_profiles() 1210 if (ns_name) { in aa_replace_profiles() 1211 if (ent->ns_name && in aa_replace_profiles() [all …]
|
| H A D | lib.c | 183 const char *aa_splitn_fqname(const char *fqname, size_t n, const char **ns_name, in aa_splitn_fqname() argument 189 *ns_name = NULL; in aa_splitn_fqname() 197 *ns_name = skipn_spaces(&name[1], end - &name[1]); in aa_splitn_fqname() 198 if (!*ns_name) in aa_splitn_fqname() 201 *ns_len = split - *ns_name; in aa_splitn_fqname() 203 *ns_name = NULL; in aa_splitn_fqname() 211 *ns_len = end - *ns_name; in aa_splitn_fqname()
|
| H A D | policy_unpack.c | 64 static int audit_iface(struct aa_profile *new, const char *ns_name, in audit_iface() argument 72 ad.iface.ns = ns_name; in audit_iface() 1115 static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name) in unpack_profile() argument 1129 *ns_name = NULL; in unpack_profile() 1145 *ns_name = kstrndup(tmpns, ns_len, GFP_KERNEL); in unpack_profile() 1146 if (!*ns_name) { in unpack_profile() 1414 if (*ns_name) { in unpack_profile() 1415 kfree(*ns_name); in unpack_profile() 1416 *ns_name = NULL; in unpack_profile() 1606 kfree(ent->ns_name); in aa_load_ent_free() [all …]
|
| H A D | label.c | 1300 const char *ns_name; in match_component() local 1306 ns_name = aa_ns_name(profile->ns, tp->ns, true); in match_component() 1308 state = aa_dfa_match(rules->policy->dfa, state, ns_name); in match_component() 1543 const char *ns_name = NULL; in aa_profile_snxprint() local 1555 ns_name = aa_ns_name(view, profile->ns, in aa_profile_snxprint() 1557 if (ns_name == aa_hidden_ns_name) { in aa_profile_snxprint() 1560 return snprintf(str, size, "%s", ns_name); in aa_profile_snxprint() 1567 if (ns_name) in aa_profile_snxprint() 1568 return snprintf(str, size, ":%s:%s (%s)", ns_name, in aa_profile_snxprint() 1574 if (ns_name) in aa_profile_snxprint() [all …]
|
| H A D | domain.c | 99 const char *ns_name; in match_component() local 107 ns_name = aa_ns_name(profile->ns, tp->ns, true); in match_component() 109 state = aa_dfa_match(rules->file->dfa, state, ns_name); in match_component()
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | xdp_do_redirect.c | 310 char ns_name[4] = {}; in ping_setup() local 312 snprintf(ns_name, 4, "NS%d", i); in ping_setup() 313 data->ns[i] = netns_new(ns_name, false); in ping_setup() 319 NS0, i, i, i, i, ns_name); in ping_setup() 322 SYS(fail, "ip -n %s addr add %s.%d/24 dev veth0", ns_name, IPV4_NETWORK, i); in ping_setup() 323 SYS(fail, "ip -n %s link set veth0 up", ns_name); in ping_setup() 345 char ns_name[4] = {}; in ping_test() local 347 snprintf(ns_name, 4, "NS%d", i); in ping_test() 348 nstoken = open_netns(ns_name); in ping_test()
|
| /linux/tools/testing/selftests/net/lib/py/ |
| H A D | netns.py | 111 def __init__(self, ns_name): 112 self.ns_path = f"/run/netns/{ns_name}" 38 __init__(self, ns_name) global() argument
|
| /linux/security/apparmor/include/ |
| H A D | policy_unpack.h | 26 const char *ns_name; member
|
| H A D | lib.h | 98 const char *aa_splitn_fqname(const char *fqname, size_t n, const char **ns_name,
|