OSDN Git Service

inet: protect against too small mtu values.
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / include / net / ip.h
index e2320f9..6067b7a 100644 (file)
@@ -596,4 +596,9 @@ extern int sysctl_icmp_msgs_burst;
 int ip_misc_proc_init(void);
 #endif
 
+static inline bool inetdev_valid_mtu(unsigned int mtu)
+{
+       return likely(mtu >= IPV4_MIN_MTU);
+}
+
 #endif /* _IP_H */