From: Florian Westphal Date: Wed, 24 Jul 2024 23:48:23 +0000 (+0200) Subject: src: remove decnet support X-Git-Tag: v1.0.6.1~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d07b4c8af3495ed94f704b6188d82f1427ea544b;p=thirdparty%2Fnftables.git src: remove decnet support commit 80258b03640a729113195fad027d61fd17692db9 upstream. Removed two years ago with v6.1, ditch this from hook list code as well. Signed-off-by: Florian Westphal --- diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am index eb9fc4e4..f7a8b7aa 100644 --- a/include/linux/Makefile.am +++ b/include/linux/Makefile.am @@ -6,7 +6,6 @@ SUBDIRS = netfilter \ noinst_HEADERS = netfilter_arp.h \ netfilter_bridge.h \ - netfilter_decnet.h \ netfilter.h \ netfilter_ipv4.h \ netfilter_ipv6.h diff --git a/include/linux/netfilter_decnet.h b/include/linux/netfilter_decnet.h deleted file mode 100644 index ca70c6cd..00000000 --- a/include/linux/netfilter_decnet.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef __LINUX_DECNET_NETFILTER_H -#define __LINUX_DECNET_NETFILTER_H - -/* DECnet-specific defines for netfilter. - * This file (C) Steve Whitehouse 1999 derived from the - * ipv4 netfilter header file which is - * (C)1998 Rusty Russell -- This code is GPL. - */ - -#include - -/* only for userspace compatibility */ -/* IP Cache bits. */ -/* Src IP address. */ -#define NFC_DN_SRC 0x0001 -/* Dest IP address. */ -#define NFC_DN_DST 0x0002 -/* Input device. */ -#define NFC_DN_IF_IN 0x0004 -/* Output device. */ -#define NFC_DN_IF_OUT 0x0008 - -/* DECnet Hooks */ -/* After promisc drops, checksum checks. */ -#define NF_DN_PRE_ROUTING 0 -/* If the packet is destined for this box. */ -#define NF_DN_LOCAL_IN 1 -/* If the packet is destined for another interface. */ -#define NF_DN_FORWARD 2 -/* Packets coming from a local process. */ -#define NF_DN_LOCAL_OUT 3 -/* Packets about to hit the wire. */ -#define NF_DN_POST_ROUTING 4 -/* Input Hello Packets */ -#define NF_DN_HELLO 5 -/* Input Routing Packets */ -#define NF_DN_ROUTE 6 -#define NF_DN_NUMHOOKS 7 - -enum nf_dn_hook_priorities { - NF_DN_PRI_FIRST = INT_MIN, - NF_DN_PRI_CONNTRACK = -200, - NF_DN_PRI_MANGLE = -150, - NF_DN_PRI_NAT_DST = -100, - NF_DN_PRI_FILTER = 0, - NF_DN_PRI_NAT_SRC = 100, - NF_DN_PRI_DNRTMSG = 200, - NF_DN_PRI_LAST = INT_MAX, -}; - -struct nf_dn_rtmsg { - int nfdn_ifindex; -}; - -#define NFDN_RTMSG(r) ((unsigned char *)(r) + NLMSG_ALIGN(sizeof(struct nf_dn_rtmsg))) - -/* backwards compatibility for userspace */ -#define DNRMG_L1_GROUP 0x01 -#define DNRMG_L2_GROUP 0x02 - -enum { - DNRNG_NLGRP_NONE, -#define DNRNG_NLGRP_NONE DNRNG_NLGRP_NONE - DNRNG_NLGRP_L1, -#define DNRNG_NLGRP_L1 DNRNG_NLGRP_L1 - DNRNG_NLGRP_L2, -#define DNRNG_NLGRP_L2 DNRNG_NLGRP_L2 - __DNRNG_NLGRP_MAX -}; -#define DNRNG_NLGRP_MAX (__DNRNG_NLGRP_MAX - 1) - -#endif /*__LINUX_DECNET_NETFILTER_H*/ diff --git a/src/mnl.c b/src/mnl.c index b84b59aa..f55add00 100644 --- a/src/mnl.c +++ b/src/mnl.c @@ -2495,29 +2495,6 @@ static int mnl_nft_dump_nf_netdev(struct netlink_ctx *ctx, int family, int hook, return err; } -static int mnl_nft_dump_nf_decnet(struct netlink_ctx *ctx, int family, int hook, - const char *devname, struct list_head *hook_list, - int *ret) -{ - int i, err; - - /* show ingress in first place in hook listing. */ - err = __mnl_nft_dump_nf_hooks(ctx, family, NFPROTO_NETDEV, NF_NETDEV_INGRESS, devname, hook_list); - if (err < 0) - *ret = err; - -#define NF_DN_NUMHOOKS 7 - for (i = 0; i < NF_DN_NUMHOOKS; i++) { - err = __mnl_nft_dump_nf_hooks(ctx, family, family, i, devname, hook_list); - if (err < 0) { - *ret = err; - return err; - } - } - - return err; -} - static void release_hook_list(struct list_head *hook_list) { struct basehook *hook, *next; @@ -2540,7 +2517,6 @@ int mnl_nft_dump_nf_hooks(struct netlink_ctx *ctx, int family, int hook, const c mnl_nft_dump_nf(ctx, NFPROTO_IPV4, hook, devname, &hook_list, &ret); mnl_nft_dump_nf(ctx, NFPROTO_IPV6, hook, devname, &hook_list, &ret); mnl_nft_dump_nf(ctx, NFPROTO_BRIDGE, hook, devname, &hook_list, &ret); - mnl_nft_dump_nf_decnet(ctx, NFPROTO_DECNET, hook, devname, &hook_list, &ret); break; case NFPROTO_INET: mnl_nft_dump_nf(ctx, NFPROTO_IPV4, hook, devname, &hook_list, &ret); @@ -2557,9 +2533,6 @@ int mnl_nft_dump_nf_hooks(struct netlink_ctx *ctx, int family, int hook, const c case NFPROTO_NETDEV: mnl_nft_dump_nf_netdev(ctx, family, hook, devname, &hook_list, &ret); break; - case NFPROTO_DECNET: - mnl_nft_dump_nf_decnet(ctx, family, hook, devname, &hook_list, &ret); - break; } switch (family) {