Bug 232018 - [PATCH][bhyve] Add IPv6 support to VNC frame buffer server
Summary: [PATCH][bhyve] Add IPv6 support to VNC frame buffer server
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Some People
Assignee: Bjoern A. Zeeb
URL:
Keywords: ipv6, patch
Depends on:
Blocks:
 
Reported: 2018-10-06 23:39 UTC by Dave Rush
Modified: 2018-10-31 12:14 UTC (History)
1 user (show)

See Also:


Attachments
Support IPv6 in bhyve VNC server (4.55 KB, patch)
2018-10-06 23:39 UTC, Dave Rush
no flags Details | Diff
Updated version of you patch for review (5.43 KB, patch)
2018-10-22 11:53 UTC, Bjoern A. Zeeb
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Rush 2018-10-06 23:39:12 UTC
Created attachment 197853 [details]
Support IPv6 in bhyve VNC server

This patch adds IPv6 support to bhyve VNC server.

It supports binding to all addrs via wildcard, a specific addr, or link local addr including zone identifier. If the "tcp" option is omitted then the existing default behavior or binding on 127.0.0.1:5900 is preserved.

IPv6 addresses are specified within square brackets in accordance with RFC 2732, "Format for Literal IPv6 Addresses in URL's". The reason for this is to disambiguate the colon separating the IP addr and port number.

IPv4/IPv6 connectivity was tested using TigerVNC with this patch applied to both FreeBSD 11.2 and CURRENT (as of this morning).
Comment 1 Bjoern A. Zeeb freebsd_committer 2018-10-22 11:53:31 UTC
Created attachment 198462 [details]
Updated version of you patch for review

Hi,

I've slightly updated the patch.  Could you have a look and see if it still works for you as expected and I'd commit it.  (I've also added initial src.conf support for INET/INET6, but didn't want to entirely conflate it with this patch;  so will do the full pass at a later time).

If this is still OK for you, I'll get it into the tree.
Comment 2 Dave Rush 2018-10-23 23:54:58 UTC
The updated patch looks great.

I would be thrilled to see this feature land in a RELEASE at some point not to far in the future.

Thanks for the help.
Comment 3 commit-hook freebsd_committer 2018-10-24 13:31:31 UTC
A commit references this bug:

Author: bz
Date: Wed Oct 24 08:45:34 UTC 2018
New revision: 339681
URL: https://svnweb.freebsd.org/changeset/base/339681

Log:
  Allow the bhyve VNC server to listen on IPv6 for incoming connections.

  Alternatively to IPv4 address:port this will allow to listen on IPv6
  link-local (incl. scope), a specific address, or ::.  Addresses have
  to be given in RFC2732 format so that [::]:port parsing will work.

  This patch also starts to introduce WITH_INET/INET6_SUPPORT to bhyve.

  PR:			232018
  Submitted by:		Dave Rush (northwoodlogic.free gmail.com) (original)
  Reviewed by:		Dave Rush (updated verison)
  MFC after:		3 days

Changes:
  head/usr.sbin/bhyve/Makefile
  head/usr.sbin/bhyve/bhyve.8
  head/usr.sbin/bhyve/pci_fbuf.c
  head/usr.sbin/bhyve/rfb.c
Comment 4 commit-hook freebsd_committer 2018-10-31 11:37:19 UTC
A commit references this bug:

Author: bz
Date: Wed Oct 31 11:37:06 UTC 2018
New revision: 339947
URL: https://svnweb.freebsd.org/changeset/base/339947

Log:
  MFC r339586:

    In bhyve's fbuf emulation improve the overall "usage" message and
    for the vga option, rather than printing the entire option string,
    only print vga (as we do for everything else).

  MFC r339681:

    Allow the bhyve VNC server to listen on IPv6 for incoming connections.

    Alternatively to IPv4 address:port this will allow to listen on IPv6
    link-local (incl. scope), a specific address, or ::.  Addresses have
    to be given in RFC2732 format so that [::]:port parsing will work.

    This patch also starts to introduce WITH_INET/INET6_SUPPORT to bhyve.

  PR:			232018
    Submitted by:	Dave Rush (northwoodlogic.free gmail.com) (original)
    Reviewed by:	Dave Rush (updated verison)

Changes:
_U  stable/11/
  stable/11/usr.sbin/bhyve/Makefile
  stable/11/usr.sbin/bhyve/bhyve.8
  stable/11/usr.sbin/bhyve/pci_fbuf.c
  stable/11/usr.sbin/bhyve/rfb.c
Comment 5 commit-hook freebsd_committer 2018-10-31 12:06:42 UTC
A commit references this bug:

Author: bz
Date: Wed Oct 31 12:05:46 UTC 2018
New revision: 339949
URL: https://svnweb.freebsd.org/changeset/base/339949

Log:
  MFC r339586:

    In bhyve's fbuf emulation improve the overall "usage" message and
    for the vga option, rather than printing the entire option string,
    only print vga (as we do for everything else).

  MFC r339681:

    Allow the bhyve VNC server to listen on IPv6 for incoming connections.

    Alternatively to IPv4 address:port this will allow to listen on IPv6
    link-local (incl. scope), a specific address, or ::.  Addresses have
    to be given in RFC2732 format so that [::]:port parsing will work.

    This patch also starts to introduce WITH_INET/INET6_SUPPORT to bhyve.

  PR:			232018
    Submitted by:	Dave Rush (northwoodlogic.free gmail.com) (original)
    Reviewed by:	Dave Rush (updated verison)

  Approved by:	re (kib)

Changes:
_U  stable/12/
  stable/12/usr.sbin/bhyve/Makefile
  stable/12/usr.sbin/bhyve/bhyve.8
  stable/12/usr.sbin/bhyve/pci_fbuf.c
  stable/12/usr.sbin/bhyve/rfb.c
Comment 6 Bjoern A. Zeeb freebsd_committer 2018-10-31 12:14:28 UTC
I've merged the changes to 12 (so will be in 12.0-RELEASE) and to stable/11.

Thank you for submitting the patch and testing/reviewing the updated one!