Bug 223661 - krfb invitations contain IP address of an unconnected virbr0 interface
Summary: krfb invitations contain IP address of an unconnected virbr0 interface
Status: CONFIRMED
Alias: None
Product: krfb
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: George Goldberg
URL:
Keywords:
: 254678 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-01-21 11:22 UTC by Bjarne Juul Pasgaard
Modified: 2010-10-20 00:55 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bjarne Juul Pasgaard 2010-01-21 11:22:23 UTC
Version:           4:4.3.4-0ubuntu1~karmic1 (using KDE 4.3.4)
OS:                Linux
Installed from:    Ubuntu Packages

The virbr0 interface is apparently used as a "virtual bridge" interface for virtual machines. However, krfb thinks this interface can be used to connect to the internet from the host OS (not the guest OS) and consequently puts this IP address in the invitation. This is incorrect.

I'm guessing (without reading the krfb source code), that krfb picks the IP address of the first interface that has an IP address. This doesn't seem to be a good strategy as it is perfectly ok to have a host with multiple interfaces - each connected to a different network.

Alternative idea: Use routing information (e.g. match the receivers IP address with info from "route -n") to come with a better guess about which IP address to put into the invitation - and at the same time make the IP address in the invitation editable for advanced usage.
Comment 1 Bernd Nies 2010-02-22 15:02:43 UTC
Same issue here with virtual interfaces created by VMware Workstation.

bernd@adnws007:~> rpm -qi krfb
Name        : krfb                         Relocations: (not relocatable)
Version     : 4.3.1                             Vendor: openSUSE
Release     : 4.3                           Build Date: Tue 27 Oct 2009 07:01:18 PM CET
Install Date: Mon 22 Feb 2010 01:04:27 PM CET      Build Host: build15
Group       : Productivity/Networking/Remote Desktop   Source RPM: kdenetwork4-4.3.1-4.3.src.rpm
Size        : 670859                           License: GPL v2 or later
Signature   : RSA/8, Tue 27 Oct 2009 07:05:27 PM CET, Key ID b88b2fd43dbdc284
Packager    : http://bugs.opensuse.org
URL         : http://www.kde.org
Summary     : Desktop Sharing
Description :
VNC-compatible server to share KDE desktops.



Authors:
--------
    The KDE Team <kde@kde.org>
Distribution: openSUSE 11.2


Situation: OpenSUSE 11.2 with installed VMware Workstation 7.0.1. There are two
virtual network interfaces created by VMware:


bernd@adnws007:~> /sbin/ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:21:9B:56:4B:C8  
          inet addr:192.168.12.27  Bcast:192.168.15.255  Mask:255.255.252.0
          inet6 addr: fe80::221:9bff:fe56:4bc8/64 Scope:Link               
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               
          RX packets:141974 errors:0 dropped:0 overruns:0 frame:0          
          TX packets:92609 errors:0 dropped:0 overruns:0 carrier:0         
          collisions:0 txqueuelen:1000                                     
          RX bytes:158927253 (151.5 Mb)  TX bytes:26008870 (24.8 Mb)       
          Interrupt:16                                                     

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:208 errors:0 dropped:0 overruns:0 frame:0
          TX packets:208 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:15440 (15.0 Kb)  TX bytes:15440 (15.0 Kb)

vmnet1    Link encap:Ethernet  HWaddr 00:50:56:C0:00:01
          inet addr:172.16.253.1  Bcast:172.16.253.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fec0:1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:84 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

vmnet8    Link encap:Ethernet  HWaddr 00:50:56:C0:00:08
          inet addr:172.16.254.1  Bcast:172.16.254.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fec0:8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:83 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

When starting KDE Desktop Sharing (krfb) and creating a personal invitation
then the wrong host IP address is shown. In this example the latest one in the
ifconfig list which is the VMware virtual NAT interface.

Reproducible: Always

Steps to Reproduce:
1. Install OpenSUSE 11.2
2. Install VMware Workstation
3. Login with KDE 
4. Run: Start > Applications > System > Remote Access > Desktop Sharing
5. Select "New Personal Invitation" or "New Email Invitation"
Actual Results:  
Personal Invitation / Krfb
Host: 172.16.254.1:5900
Password: XXXXXXXX

Expected Results:  
Probably the best is to use the system hostname instead of IP address for
systems with more than one network interface of with virtual interfaces.

See also: https://bugzilla.novell.com/show_bug.cgi?id=581754
Comment 2 George Goldberg 2010-07-10 15:29:10 UTC
Thanks for this bug report. You are correct that krfb  doesn't properly take into account multiple network interfaces when they are present. I'll try and get this fixed at some point soon, but unfortunately the issue is not straightforward to solve.
Comment 3 George Goldberg 2010-10-20 00:55:59 UTC
*** Bug 254678 has been marked as a duplicate of this bug. ***