extensions: Initialize linear mapping of symbols in _init() of extension

libxt_devgroup and libipt_realm currently unable to display symbolic
names in save/print commands because linear mapping is not initialized.

It looks bit confusing as linear mapping initialization is done in init()
of extension, which is expected to be called before any other function of
extension.

However init is called only when '-m' option specified on command line,
that is true only for insert, append, replace and destroy iptables
commands.

Move initialization to extension _init() function before calling
any function in extension.

Before:
-------
... src-group 0x1 dst-group 0x2
... src-group 0x2 dst-group 0x1

After:
------
... src-group grp1 dst-group grp2
... src-group grp2 dst-group grp1

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
2 files changed