Staging
v0.8.1
https://github.com/torvalds/linux
Raw File
Tip revision: 88603b6dc419445847923fcb7fe5080067a30f98 authored by Linus Torvalds on 01 January 2023, 21:53:16 UTC
Linux 6.2-rc2
Tip revision: 88603b6
action.c
/* SPDX-License-Identifier: GPL-2.0
 * Copyright (c) 2018 Davide Caratti, Red Hat inc.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General Public
 * License as published by the Free Software Foundation.
 */

#include <linux/bpf.h>
#include <linux/pkt_cls.h>

__attribute__((section("action-ok"),used)) int action_ok(struct __sk_buff *s)
{
	return TC_ACT_OK;
}

__attribute__((section("action-ko"),used)) int action_ko(struct __sk_buff *s)
{
	s->data = 0x0;
	return TC_ACT_OK;
}

char _license[] __attribute__((section("license"),used)) = "GPL";
back to top