Revision fa2da8cdae1dd64f78fc915ca1d1a4a93c71e7cb authored by stephen hemminger on 15 November 2011, 08:09:14 UTC, committed by David S. Miller on 16 November 2011, 22:32:43 UTC
Bridge multicast snooping of ICMPv6 would incorrectly report a checksum problem
when used with Ethernet devices like sky2 that use CHECKSUM_COMPLETE.
When bytes are removed from skb, the computed checksum needs to be adjusted.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Tested-by: Martin Volf <martin.volf.42@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 0284a0f
Raw File
lcm.c
#include <linux/kernel.h>
#include <linux/gcd.h>
#include <linux/module.h>
#include <linux/lcm.h>

/* Lowest common multiple */
unsigned long lcm(unsigned long a, unsigned long b)
{
	if (a && b)
		return (a * b) / gcd(a, b);
	else if (b)
		return b;

	return a;
}
EXPORT_SYMBOL_GPL(lcm);
back to top