From: planck kernel size experiment Subject: ipv4: replace IGMP and multicast membership with rejection stubs The fixed-function logger accepts unicast TCP and UDP on its configured IPv4 address. It never joins a multicast group, receives a multicast log stream, or reports multicast membership. Even with CONFIG_IP_MULTICAST disabled, igmp.o keeps the generic membership lists, source filters, socket-option API and route checks linked. Make this contract explicit: multicast joins and queries report EOPNOTSUPP, multicast destinations never match this host or a UDP socket, and the now-empty device/socket lifecycle hooks do nothing. Unicast source filtering continues to allow delivery. The chained proof still has to complete exact UDP and TCP receives, persist both records to Minix, read them back, and transmit the final ICMP commit signal. Measured effect on RV32: Image shrank by exactly 8,192 bytes (1,225,152 to 1,216,960 bytes), with the complete acceptance proof still passing. --- a/net/ipv4/Makefile +++ b/net/ipv4/Makefile @@ -12,7 +12,7 @@ obj-y := route.o inetpeer.o protocol.o \ tcp_rate.o tcp_recovery.o tcp_ulp.o \ tcp_offload.o tcp_plb.o datagram.o raw.o udp.o \ - udp_offload.o arp.o icmp.o devinet.o af_inet.o igmp.o \ + udp_offload.o arp.o icmp.o devinet.o af_inet.o planck_unicast.o \ fib_frontend.o fib_semantics.o fib_trie.o fib_notifier.o \ inet_fragment.o ping.o \ metrics.o netlink.o nexthop.o udp_tunnel_stub.o --- /dev/null +++ b/net/ipv4/planck_unicast.c @@ -0,0 +1,93 @@ +// SPDX-License-Identifier: GPL-2.0 +/* Deliberately unsupported IPv4 multicast surface for the planck logger. */ +#include +#include +#include + +#include "igmp_internal.h" + +int inet_fill_ifmcaddr(struct sk_buff *skb, struct net_device *dev, + const struct ip_mc_list *im, + struct inet_fill_args *args) +{ + return -EOPNOTSUPP; +} + +int ip_check_mc_rcu(struct in_device *in_dev, __be32 mc_addr, + __be32 src_addr, u8 proto) +{ + return 0; +} + +int ip_mc_join_group(struct sock *sk, struct ip_mreqn *imr) +{ + return -EOPNOTSUPP; +} + +int ip_mc_join_group_ssm(struct sock *sk, struct ip_mreqn *imr, + unsigned int mode) +{ + return -EOPNOTSUPP; +} + +int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr) +{ + return -EOPNOTSUPP; +} + +void ip_mc_drop_socket(struct sock *sk) +{ +} + +int ip_mc_source(int add, int omode, struct sock *sk, + struct ip_mreq_source *mreqs, int ifindex) +{ + return -EOPNOTSUPP; +} + +int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex) +{ + return -EOPNOTSUPP; +} + +int ip_mc_msfget(struct sock *sk, struct ip_msfilter *msf, + sockptr_t optval, sockptr_t optlen) +{ + return -EOPNOTSUPP; +} + +int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf, + sockptr_t optval, size_t offset) +{ + return -EOPNOTSUPP; +} + +int ip_mc_sf_allow(const struct sock *sk, __be32 local, __be32 remote, + int dif, int sdif) +{ + return !ipv4_is_multicast(local); +} + +void ip_mc_init_dev(struct in_device *in_dev) +{ +} + +void ip_mc_destroy_dev(struct in_device *in_dev) +{ +} + +void ip_mc_up(struct in_device *in_dev) +{ +} + +void ip_mc_down(struct in_device *in_dev) +{ +} + +void ip_mc_unmap(struct in_device *in_dev) +{ +} + +void ip_mc_remap(struct in_device *in_dev) +{ +}