/* * Copyright (C) 2014-2015 Tobias Klauser * Copyright (C) 2009-2012 Daniel Borkmann * * This file is part of llmnrd. * * llmnrd is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, version 2 of the License. * * llmnrd is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with llmnrd. If not, see . */ #include #include #include "util.h" void *xmalloc(size_t size) { void *ptr; if (size == 0) panic("malloc: size 0\n"); ptr = malloc(size); if (!ptr) panic("malloc: out of memory\n"); return ptr; } void *xzalloc(size_t size) { void *ptr = xmalloc(size); memset(ptr, 0, size); return ptr; } void *xrealloc(void *ptr, size_t size) { void *newptr; if (size == 0) panic("realloc: size 0\n"); newptr = realloc(ptr, size); if (!newptr) { free(ptr); panic("realloc: out of memory\n"); } return newptr; } char *xstrdup(const char *s) { size_t len = strlen(s) + 1; char *ret = xmalloc(len); memcpy(ret, s, len); return ret; } class='sub'>net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNogah Frankel <nogahf@mellanox.com>2017-02-13 21:03:02 +0100
committerDavid S. Miller <davem@davemloft.net>2017-02-14 13:15:46 -0500
commit1ca6270b8d932475636364b989c6d2c2318fbabe (patch)
tree91846b8d91e29cfa2c2481cb3ff960af4e647675
parentafe3939eb9c8d95debb3c14d5576802b3837c179 (diff)
mlxsw: spectrum: Change ipv6 unregistered mc table
Point back the unregister IPv6 mc table to the bc table. It is done since IPv6 mcast snooping is not supported for Spectrum yet. Reported-by: Jiri Pirko <jiri@mellanox.com> Fixes: 71c365bdc439 ("mlxsw: spectrum: Separate bc and mc floods") Signed-off-by: Nogah Frankel <nogahf@mellanox.com> Signed-off-by: Yotam Gigi <yotamg@mellanox.com> Tested-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>