Home
last modified time | relevance | path

Searched refs:ns_name (Results 1 - 18 of 18) sorted by relevance

/kernel/linux/linux-6.6/tools/testing/selftests/net/
H A Dsetup_veth.sh6 local -r ns_name="$2"
10 [[ -e /var/run/netns/"${ns_name}" ]] || ip netns add "${ns_name}"
12 ip link set dev "${ns_dev}" netns "${ns_name}" mtu 65535
13 ip -netns "${ns_name}" link set dev "${ns_dev}" up
15 ip netns exec "${ns_name}" ethtool -K "${ns_dev}" gro on tso off
27 local ns_name
29 for ns_name in client_ns server_ns; do
30 [[ -e /var/run/netns/"${ns_name}" ]] && ip netns del "${ns_name}"
[all...]
H A Dsetup_loopback.sh43 local -r ns_name="$2"
56 [[ -e /var/run/netns/"${ns_name}" ]] || ip netns add "${ns_name}"
57 ip link set dev "${ns_dev}" netns "${ns_name}"
58 ip -netns "${ns_name}" link set dev "${ns_dev}" up
60 ip -netns "${ns_name}" addr add dev "${ns_dev}" "${addr}"
68 ns_name="$1"
70 ip -netns "${ns_name}" link del dev "${ns_dev}"
71 ip netns del "${ns_name}"
H A Dpmtu.sh736 ns_name="$(nsname ${ns})"
738 ip -n "${ns_name}" route add "${addr}" table "${rt_table}" via "${gw}"
752 ns_name="$(nsname ${ns})"
754 ip -n ${ns_name} -${fam} nexthop add id ${nhid} via ${gw} dev ${dev}
766 ns_name="$(nsname ${ns})"
768 ip -n "${ns_name}" -"${fam}" route add "${addr}" table "${rt_table}" nhid "${nhid}"
785 ns_name="$(nsname ${ns})"
791 ip link add ${if} up netns ${ns_name} type veth peer name ${ifpeer} netns ${peer_name} || return 1
795 ip -n ${ns_name} addr add ${prefix4}.${segment}.1/24 dev ${if}
796 ip -n ${ns_name} add
[all...]
/kernel/linux/linux-5.10/security/apparmor/
H A Dpolicy.c462 const char *name, *ns_name; in aa_fqlookupn_profile() local
465 name = aa_splitn_fqname(fqname, n, &ns_name, &ns_len); in aa_fqlookupn_profile()
466 if (ns_name) { in aa_fqlookupn_profile()
467 ns = aa_lookupn_ns(labels_ns(base), ns_name, ns_len); in aa_fqlookupn_profile()
611 * @ns_name: name of namespace being manipulated
619 const char *ns_name, const char *name, in audit_policy()
624 aad(&sa)->iface.ns = ns_name; in audit_policy()
860 const char *ns_name = NULL, *info = NULL; in aa_replace_profiles() local
871 error = aa_unpack(udata, &lh, &ns_name); in aa_replace_profiles()
882 if (ns_name) { in aa_replace_profiles()
618 audit_policy(struct aa_label *label, const char *op, const char *ns_name, const char *name, const char *info, int error) audit_policy() argument
1101 const char *ns_name = NULL; aa_remove_profiles() local
[all...]
H A Dlib.c31 * @ns_name: pointer to portion of the string containing the ns name (NOT NULL)
42 char *aa_split_fqname(char *fqname, char **ns_name) in aa_split_fqname() argument
46 *ns_name = NULL; in aa_split_fqname()
49 *ns_name = skip_spaces(&name[1]); in aa_split_fqname()
83 const char *aa_splitn_fqname(const char *fqname, size_t n, const char **ns_name, in aa_splitn_fqname() argument
89 *ns_name = NULL; in aa_splitn_fqname()
97 *ns_name = skipn_spaces(&name[1], end - &name[1]); in aa_splitn_fqname()
98 if (!*ns_name) in aa_splitn_fqname()
101 *ns_len = split - *ns_name; in aa_splitn_fqname()
103 *ns_name in aa_splitn_fqname()
[all...]
H A Dpolicy_unpack.c97 * @ns_name: name of the ns the profile is to be loaded to (MAY BE NULL)
105 static int audit_iface(struct aa_profile *new, const char *ns_name, in audit_iface() argument
113 aad(&sa)->iface.ns = ns_name; in audit_iface()
674 static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name) in unpack_profile() argument
687 *ns_name = NULL; in unpack_profile()
703 *ns_name = kstrndup(tmpns, ns_len, GFP_KERNEL); in unpack_profile()
704 if (!*ns_name) { in unpack_profile()
1050 kfree(ent->ns_name); in aa_load_ent_free()
1188 char *ns_name = NULL; in aa_unpack() local
1195 profile = unpack_profile(&e, &ns_name); in aa_unpack()
[all...]
H A Dlabel.c1273 const char *ns_name; in match_component() local
1279 ns_name = aa_ns_name(profile->ns, tp->ns, true); in match_component()
1281 state = aa_dfa_match(profile->policy.dfa, state, ns_name); in match_component()
1516 const char *ns_name = NULL; in aa_profile_snxprint() local
1528 ns_name = aa_ns_name(view, profile->ns, in aa_profile_snxprint()
1530 if (ns_name == aa_hidden_ns_name) { in aa_profile_snxprint()
1533 return snprintf(str, size, "%s", ns_name); in aa_profile_snxprint()
1540 if (ns_name) in aa_profile_snxprint()
1541 return snprintf(str, size, ":%s:%s (%s)", ns_name, in aa_profile_snxprint()
1547 if (ns_name) in aa_profile_snxprint()
[all...]
H A Ddomain.c101 const char *ns_name; in match_component() local
109 ns_name = aa_ns_name(profile->ns, tp->ns, true); in match_component()
111 state = aa_dfa_match(profile->file.dfa, state, ns_name); in match_component()
/kernel/linux/linux-6.6/security/apparmor/
H A Dlib.c51 * @ns_name: pointer to portion of the string containing the ns name (NOT NULL)
62 char *aa_split_fqname(char *fqname, char **ns_name) in aa_split_fqname() argument
66 *ns_name = NULL; in aa_split_fqname()
69 *ns_name = skip_spaces(&name[1]); in aa_split_fqname()
104 const char *aa_splitn_fqname(const char *fqname, size_t n, const char **ns_name, in aa_splitn_fqname() argument
110 *ns_name = NULL; in aa_splitn_fqname()
118 *ns_name = skipn_spaces(&name[1], end - &name[1]); in aa_splitn_fqname()
119 if (!*ns_name) in aa_splitn_fqname()
122 *ns_len = split - *ns_name; in aa_splitn_fqname()
124 *ns_name in aa_splitn_fqname()
[all...]
H A Dpolicy.c556 const char *name, *ns_name; in aa_fqlookupn_profile() local
559 name = aa_splitn_fqname(fqname, n, &ns_name, &ns_len); in aa_fqlookupn_profile()
560 if (ns_name) { in aa_fqlookupn_profile()
561 ns = aa_lookupn_ns(labels_ns(base), ns_name, ns_len); in aa_fqlookupn_profile()
738 * @ns_name: name of namespace being manipulated
746 const char *ns_name, const char *name, in audit_policy()
751 ad.iface.ns = ns_name; in audit_policy()
1036 const char *ns_name = NULL, *info = NULL; in aa_replace_profiles() local
1047 error = aa_unpack(udata, &lh, &ns_name); in aa_replace_profiles()
1058 if (ns_name) { in aa_replace_profiles()
745 audit_policy(struct aa_label *subj_label, const char *op, const char *ns_name, const char *name, const char *info, int error) audit_policy() argument
1300 const char *ns_name = NULL; aa_remove_profiles() local
[all...]
H A Dpolicy_unpack.c54 * @ns_name: name of the ns the profile is to be loaded to (MAY BE NULL)
62 static int audit_iface(struct aa_profile *new, const char *ns_name, in audit_iface() argument
70 ad.iface.ns = ns_name; in audit_iface()
798 * @ns_name: pointer of newly allocated copy of %NULL in case of error
802 static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name) in unpack_profile() argument
816 *ns_name = NULL; in unpack_profile()
832 *ns_name = kstrndup(tmpns, ns_len, GFP_KERNEL); in unpack_profile()
833 if (!*ns_name) { in unpack_profile()
1108 if (*ns_name) { in unpack_profile()
1109 kfree(*ns_name); in unpack_profile()
1410 char *ns_name = NULL; aa_unpack() local
[all...]
H A Dlabel.c1269 const char *ns_name; in match_component() local
1275 ns_name = aa_ns_name(profile->ns, tp->ns, true); in match_component()
1277 state = aa_dfa_match(rules->policy.dfa, state, ns_name); in match_component()
1516 const char *ns_name = NULL; in aa_profile_snxprint() local
1528 ns_name = aa_ns_name(view, profile->ns, in aa_profile_snxprint()
1530 if (ns_name == aa_hidden_ns_name) { in aa_profile_snxprint()
1533 return snprintf(str, size, "%s", ns_name); in aa_profile_snxprint()
1540 if (ns_name) in aa_profile_snxprint()
1541 return snprintf(str, size, ":%s:%s (%s)", ns_name, in aa_profile_snxprint()
1547 if (ns_name) in aa_profile_snxprint()
[all...]
H A Ddomain.c93 const char *ns_name; in match_component() local
101 ns_name = aa_ns_name(profile->ns, tp->ns, true); in match_component()
103 state = aa_dfa_match(rules->file.dfa, state, ns_name); in match_component()
/kernel/linux/linux-5.10/security/apparmor/include/
H A Dlib.h55 char *aa_split_fqname(char *args, char **ns_name);
56 const char *aa_splitn_fqname(const char *fqname, size_t n, const char **ns_name,
H A Dpolicy_unpack.h24 const char *ns_name; member
/kernel/linux/linux-6.6/security/apparmor/include/
H A Dlib.h60 char *aa_split_fqname(char *args, char **ns_name);
61 const char *aa_splitn_fqname(const char *fqname, size_t n, const char **ns_name,
H A Dpolicy_unpack.h25 const char *ns_name; member
/kernel/linux/linux-5.10/tools/testing/selftests/net/
H A Dpmtu.sh648 ns_name="$(nsname ${ns})"
650 ip -n ${ns_name} route add ${addr} via ${gw}
664 ns_name="$(nsname ${ns})"
666 ip -n ${ns_name} -${fam} nexthop add id ${nhid} via ${gw} dev ${dev}
678 ns_name="$(nsname ${ns})"
680 ip -n ${ns_name} -${fam} route add ${addr} nhid ${nhid}
697 ns_name="$(nsname ${ns})"
703 ip link add ${if} up netns ${ns_name} type veth peer name ${ifpeer} netns ${peer_name} || return 1
707 ip -n ${ns_name} addr add ${prefix4}.${segment}.1/24 dev ${if}
708 ip -n ${ns_name} add
[all...]

Completed in 19 milliseconds