#include #include #include #include "notifier-error-inject.h" static int priority; module_param(priority, int, 0); MODULE_PARM_DESC(priority, "specify netdevice notifier priority"); static struct notifier_err_inject netdev_notifier_err_inject = { .actions = { { NOTIFIER_ERR_INJECT_ACTION(NETDEV_REGISTER) }, { NOTIFIER_ERR_INJECT_ACTION(NETDEV_CHANGEMTU) }, { NOTIFIER_ERR_INJECT_ACTION(NETDEV_CHANGENAME) }, { NOTIFIER_ERR_INJECT_ACTION(NETDEV_PRE_UP) }, { NOTIFIER_ERR_INJECT_ACTION(NETDEV_PRE_TYPE_CHANGE) }, { NOTIFIER_ERR_INJECT_ACTION(NETDEV_POST_INIT) }, { NOTIFIER_ERR_INJECT_ACTION(NETDEV_PRECHANGEMTU) }, { NOTIFIER_ERR_INJECT_ACTION(NETDEV_PRECHANGEUPPER) }, { NOTIFIER_ERR_INJECT_ACTION(NETDEV_CHANGEUPPER) }, {} } }; static struct dentry *dir; static int netdev_err_inject_init(void) { int err; dir = notifier_err_inject_init("netdev", notifier_err_inject_dir, &netdev_notifier_err_inject, priority); if (IS_ERR(dir)) return PTR_ERR(dir); err = register_netdevice_notifier(&netdev_notifier_err_inject.nb); if (err) debugfs_remove_recursive(dir); return err; } static void netdev_err_inject_exit(void) { unregister_netdevice_notifier(&netdev_notifier_err_inject.nb); debugfs_remove_recursive(dir); } module_init(netdev_err_inject_init); module_exit(netdev_err_inject_exit); MODULE_DESCRIPTION("Netdevice notifier error injection module"); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Nikolay Aleksandrov "); ummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Neira <pablo@netfilter.org>2017-01-26 22:56:21 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-27 10:33:56 -0500
commit92e55f412cffd016cc245a74278cb4d7b89bb3bc (patch)
treeab90e2e59c82daae60d2c953ef6c780e1f6e5550 /include/scsi/sas.h
parenta47b70ea86bdeb3091341f5ae3ef580f1a1ad822 (diff)
tcp: don't annotate mark on control socket from tcp_v6_send_response()
Unlike ipv4, this control socket is shared by all cpus so we cannot use it as scratchpad area to annotate the mark that we pass to ip6_xmit(). Add a new parameter to ip6_xmit() to indicate the mark. The SCTP socket family caches the flowi6 structure in the sctp_transport structure, so we cannot use to carry the mark unless we later on reset it back, which I discarded since it looks ugly to me. Fixes: bf99b4ded5f8 ("tcp: fix mark propagation with fwmark_reflect enabled") Suggested-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/scsi/sas.h')