Marcos Paulo de Souza <marcos.souza.org@xxxxxxxxx> wrote: > [marcos@Icarus ~]$ conntrack -l something > nfct_labelmap_new: No such file or directory > Segmentation fault (core dumped) conntrack should not pass NULL in the first place. However I agree that lnf-conntrack should be more robust so I applied this patch, thanks. > This is my first patch to netfilter and conntrack-tools, so please let > me know if I sent to the right place, or if the patch needs more work. I changed patch title to 'labels: don't crash on NULL labelmap'. > int __labelmap_get_bit(struct nfct_labelmap *m, const char *name) > { > - unsigned int i = hash_name(name); > + unsigned int i; > + if (!m) > + return -1; > + > + i = hash_name(name); > struct labelmap_bucket *list = m->map_name[i]; I moved this a bit to avoid mixing declaration and code, but otherwise it should be the same change. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html