diff -u -r igmpproxy-0.1_beta4/doc/igmpproxy.conf.5.in igmpproxy-0.1_beta4_whitelist/doc/igmpproxy.conf.5.in
--- igmpproxy-0.1_beta4/doc/igmpproxy.conf.5.in	2009-05-05 19:15:06.000000000 +0200
+++ igmpproxy-0.1_beta4_whitelist/doc/igmpproxy.conf.5.in	2009-08-06 21:33:36.000000000 +0200
@@ -116,6 +116,25 @@
 traffic is often from a remote location. Any number of altnet parameters can be specified.
 .RE
 
+.B whitelist
+.I networkaddr
+.RS
+Defines a whitelist for multicast groups. The network address must be in the following
+format 'a.b.c.d/n'. If you want to allow one single group use a network mask of /32,
+i.e. 'a.b.c.d/32'. 
+
+By default all multicast groups are allowed on any downstream interface. If at least one
+whitelist entry is defined, all igmp membership reports for not explicitly whitelisted
+multicast groups will be ignored and therefore not be served by igmpproxy. This is especially
+useful, if your provider does only allow a predefined set of multicast groups. These whitelists
+are only obeyed by igmpproxy itself, they won't prevent any other igmp client running on the
+same machine as igmpproxy from requesting 'unallowed' multicast groups.
+
+You may specify as many whitelist entries as needed. Although you should keep it as simple as
+possible, as this list is parsed for every membership report and therefore this increases igmp
+response times. Often used or large groups should be defined first, as parsing ends as soon as
+a group matches an entry.
+.RE
 
 .SH EXAMPLE
 ## Enable quickleave
diff -u -r igmpproxy-0.1_beta4/src/config.c igmpproxy-0.1_beta4_whitelist/src/config.c
--- igmpproxy-0.1_beta4/src/config.c	2009-05-13 21:43:18.000000000 +0200
+++ igmpproxy-0.1_beta4_whitelist/src/config.c	2009-08-06 20:52:30.000000000 +0200
@@ -46,6 +46,9 @@
 
     // Keep allowed nets for VIF.
     struct SubnetList*  allowednets;
+
+    // Allowed Groups
+    struct SubnetList*  allowedgroups;
     
     // Next config in list...
     struct vifconfig*   next;
@@ -202,6 +205,8 @@
                     // Insert the configured nets...
                     vifLast->next = confPtr->allowednets;
 
+		    Dp->allowedgroups = confPtr->allowedgroups;
+
                     break;
                 }
             }
@@ -215,7 +220,7 @@
 */
 struct vifconfig *parsePhyintToken() {
     struct vifconfig  *tmpPtr;
-    struct SubnetList **anetPtr;
+    struct SubnetList **anetPtr, **agrpPtr;
     char *token;
     short parseError = 0;
 
@@ -239,6 +244,7 @@
     tmpPtr->threshold = 1;
     tmpPtr->state = IF_STATE_DOWNSTREAM;
     tmpPtr->allowednets = NULL;
+    tmpPtr->allowedgroups = NULL;
 
     // Make a copy of the token to store the IF name
     tmpPtr->name = strdup( token );
@@ -248,6 +254,7 @@
 
     // Set the altnet pointer to the allowednets pointer.
     anetPtr = &tmpPtr->allowednets;
+    agrpPtr = &tmpPtr->allowedgroups; 
 
     // Parse the rest of the config..
     token = nextConfigToken();
@@ -266,6 +273,20 @@
                 anetPtr = &(*anetPtr)->next;
             }
         }
+	else if(strcmp("whitelist", token)==0) {
+	    // Whitelist
+	    token = nextConfigToken();
+	    my_log(LOG_DEBUG, 0, "Config: IF: Got whitelist token %s.", token);
+	
+	    *agrpPtr = parseSubnetAddress(token);
+	    if(*agrpPtr == NULL) {
+		parseError = 1;
+		my_log(LOG_WARNING, 0, "Unable to parse subnet address.");
+		break;
+	    } else {
+		agrpPtr = &(*agrpPtr)->next;
+	    }
+	}
         else if(strcmp("upstream", token)==0) {
             // Upstream
             my_log(LOG_DEBUG, 0, "Config: IF: Got upstream token.");
diff -u -r igmpproxy-0.1_beta4/src/igmpproxy.h igmpproxy-0.1_beta4_whitelist/src/igmpproxy.h
--- igmpproxy-0.1_beta4/src/igmpproxy.h	2009-05-13 21:43:18.000000000 +0200
+++ igmpproxy-0.1_beta4_whitelist/src/igmpproxy.h	2009-08-06 20:54:35.000000000 +0200
@@ -145,6 +145,7 @@
     short               Flags;
     short               state;
     struct SubnetList*  allowednets;
+    struct SubnetList*  allowedgroups;
     unsigned int        robustness;
     unsigned char       threshold;   /* ttl limit */
     unsigned int        ratelimit; 
diff -u -r igmpproxy-0.1_beta4/src/request.c igmpproxy-0.1_beta4_whitelist/src/request.c
--- igmpproxy-0.1_beta4/src/request.c	2009-05-13 21:43:18.000000000 +0200
+++ igmpproxy-0.1_beta4_whitelist/src/request.c	2009-08-06 21:00:02.000000000 +0200
@@ -82,10 +82,22 @@
         my_log(LOG_DEBUG, 0, "Should insert group %s (from: %s) to route table. Vif Ix : %d",
             inetFmt(group,s1), inetFmt(src,s2), sourceVif->index);
 
-        // The membership report was OK... Insert it into the route table..
-        insertRoute(group, sourceVif->index);
-
-
+	// If we don't have a whitelist we insertRoute and done
+	if(sourceVif->allowedgroups == NULL)
+	{
+	    insertRoute(group, sourceVif->index);
+	    return;
+	}
+	// Check if this Request is legit on this interface
+	struct SubnetList *sn;
+	for(sn = sourceVif->allowedgroups; sn != NULL; sn = sn->next)
+	    if((group & sn->subnet_mask) == sn->subnet_addr)
+	    {
+        	// The membership report was OK... Insert it into the route table..
+        	insertRoute(group, sourceVif->index);
+		return;
+	    }
+	my_log(LOG_INFO, 0, "The group address %s may not be requested from this interface. Ignoring.", inetFmt(group, s1));
     } else {
         // Log the state of the interface the report was recieved on.
         my_log(LOG_INFO, 0, "Mebership report was recieved on %s. Ignoring.",

