There is a problem with ejabberd_listener, which can be considered a bug: it uses the Port number as identifier, so an ejabberd server can only have 1 listener with a given port number.
This limitation does not exist in TCP/IP: in the same machine, the same port can be listened in different addresses.
ejabberd should allow several listeners with the same port: the administrator will bind them to different IP addresses.
Each listener may have also different options (shapers, IPv4/IPv6...)
Alexey already expressed interested in solving this issue eventually.
This bug was previously reported in Bugzilla:
The reporter included a small patch, but it may raise problems to stop or restart listeners (which is possible using ejabberd Web Admin), so I doubt the patch is acceptable for ejabberd without major testing and/or rewritting.
Adding this feature will also allow to listen IPv4 and IPv6 in the same port. Mentioned in: