Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db538334 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "net: ipv6: Add sysctl entry to disable MTU updates from RA"

parents 10e278e1 befc6722
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1301,6 +1301,13 @@ accept_ra_prefix_route - BOOLEAN

	Functional default: enabled

accept_ra_mtu - BOOLEAN
	Apply the MTU value specified in RA option 5 (RFC4861). If
	disabled, the MTU specified in the RA will be ignored.

	Functional default: enabled if accept_ra is enabled.
			    disabled if accept_ra is disabled.

accept_redirects - BOOLEAN
	Accept Redirects.

+1 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ struct ipv6_devconf {
	__s32		suppress_frag_ndisc;
	__s32		accept_ra_prefix_route;
	__s32		use_oif_addrs_only;
	__s32		accept_ra_mtu;
	void		*sysctl;
};

+1 −0
Original line number Diff line number Diff line
@@ -168,6 +168,7 @@ enum {
	DEVCONF_USE_OPTIMISTIC,
	DEVCONF_ACCEPT_RA_PREFIX_ROUTE,
	DEVCONF_USE_OIF_ADDRS_ONLY,
	DEVCONF_ACCEPT_RA_MTU,
	DEVCONF_MAX
};

+10 −0
Original line number Diff line number Diff line
@@ -204,6 +204,7 @@ static struct ipv6_devconf ipv6_devconf __read_mostly = {
	.suppress_frag_ndisc	= 1,
	.accept_ra_prefix_route = 1,
	.use_oif_addrs_only	= 0,
	.accept_ra_mtu		= 1,
};

static struct ipv6_devconf ipv6_devconf_dflt __read_mostly = {
@@ -244,6 +245,7 @@ static struct ipv6_devconf ipv6_devconf_dflt __read_mostly = {
	.suppress_frag_ndisc	= 1,
	.accept_ra_prefix_route = 1,
	.use_oif_addrs_only	= 0,
	.accept_ra_mtu		= 1,
};

/* Check if a valid qdisc is available */
@@ -4466,6 +4468,7 @@ static inline void ipv6_store_devconf(struct ipv6_devconf *cnf,
	array[DEVCONF_SUPPRESS_FRAG_NDISC] = cnf->suppress_frag_ndisc;
	array[DEVCONF_ACCEPT_RA_FROM_LOCAL] = cnf->accept_ra_from_local;
	array[DEVCONF_USE_OIF_ADDRS_ONLY] = cnf->use_oif_addrs_only;
	array[DEVCONF_ACCEPT_RA_MTU] = cnf->accept_ra_mtu;
}

static inline size_t inet6_ifla6_size(void)
@@ -5394,6 +5397,13 @@ static struct addrconf_sysctl_table
			.mode           = 0644,
			.proc_handler   = proc_dointvec,
		},
		{
			.procname	= "accept_ra_mtu",
			.data		= &ipv6_devconf.accept_ra_mtu,
			.maxlen		= sizeof(int),
			.mode		= 0644,
			.proc_handler	= proc_dointvec,
		},
		{
			/* sentinel */
		}
+1 −1
Original line number Diff line number Diff line
@@ -1356,7 +1356,7 @@ skip_routeinfo:
		}
	}

	if (ndopts.nd_opts_mtu) {
	if (ndopts.nd_opts_mtu && in6_dev->cnf.accept_ra_mtu) {
		__be32 n;
		u32 mtu;