|
|
@ -9,6 +9,8 @@ extern unsigned int CONFIG_BPF __kconfig;
|
|
|
|
extern unsigned int CONFIG_PANIC_TIMEOUT __kconfig;
|
|
|
|
extern unsigned int CONFIG_PANIC_TIMEOUT __kconfig;
|
|
|
|
// CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
|
|
|
|
// CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
|
|
|
|
extern unsigned int CONFIG_DEFAULT_HUNG_TASK_TIMEOUT __kconfig;
|
|
|
|
extern unsigned int CONFIG_DEFAULT_HUNG_TASK_TIMEOUT __kconfig;
|
|
|
|
|
|
|
|
// CONFIG_DEFAULT_HOSTNAME
|
|
|
|
|
|
|
|
extern char CONFIG_DEFAULT_HOSTNAME[] __kconfig;
|
|
|
|
|
|
|
|
|
|
|
|
SEC("xdp")
|
|
|
|
SEC("xdp")
|
|
|
|
int kconfig(struct xdp_md *ctx) {
|
|
|
|
int kconfig(struct xdp_md *ctx) {
|
|
|
@ -24,6 +26,12 @@ int kconfig(struct xdp_md *ctx) {
|
|
|
|
return XDP_DROP;
|
|
|
|
return XDP_DROP;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 7; i++) {
|
|
|
|
|
|
|
|
if ("(none)"[i] != CONFIG_DEFAULT_HOSTNAME[i]) {
|
|
|
|
|
|
|
|
return XDP_DROP;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return XDP_PASS;
|
|
|
|
return XDP_PASS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|