(1) Get the MOL SRPM from a source CD or YDL site and then install /
unpack it using:
        
        rpm -ivh  mol-0.9.71-0.ydl.1.src.rpm


(2) cd /usr/src/yellowdog/SOURCES

(3) unpack the gzipped tar file

        tar zxvf mol-0.9.71.tgz
        

(2) apply alloc_h.patch

(3) apply sheep.patch *only* if you are using linux-2.6 kernel headers,
i.e., you changed /usr/include/linux and /usr/include/asm. If you have
not updated the kernel include files that came with YDL-4.0, you do not
need to apply this patch.

(4) repackage the source

        tar zcvf mol-0.9.71.tgz  mol-0.9.71

(5) edit mol-0.9.71-config
uncomment CONFIG_TAP and CONFIG_SHEEP

(6) Build MOL RPM's
        cd /usr/src/yellowdog/SPECS
        rpmbuild -bb mol.spec

(7) Reinstall MOL RPM's
        rpm -e mol mol-kmods

        cd /usr/src/yellowdog/RPMS/ppc

        rpm -ivh mol-0.9.71-0.ydl.1.ppc.rpm \   
                 mol-kmods-0.9.71-0.ydl.1.ppc.rpm


-Joseph 
       
-- 
joseph_sacco[at]comcast[dot]net
*** ./src/kmod/Linux/alloc.h.orig	2004-12-28 11:33:03.000000000 -0500
--- ./src/kmod/Linux/alloc.h	2005-01-25 15:53:25.500162051 -0500
***************
*** 24,29 ****
--- 24,32 ----
  
  #ifdef LINUX_26
  #include <asm/cacheflush.h>
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+ #include <asm/io.h>
+ #endif
  #endif
  
  static inline void *kmalloc_mol( int size ) { 
*** ./src/netdriver/sheep.c	2004-12-28 12:15:49.000000000 -0500
--- ./src/netdriver/sheep.c-	2004-12-28 12:03:34.000000000 -0500
***************
*** 152,158 ****
  static int 
  sheep_net_receiver( struct sk_buff *skb, struct net_device *dev, struct packet_type *pt )
  {
! 	int multicast = (((struct ethhdr *)(skb->mac.raw))->h_dest[0] & ETH_ADDR_MULTICAST);
  	const char *laddr = dev->dev_addr;
  	struct sk_buff *skb2;
  	struct SheepVars *v = (struct SheepVars*)pt;
--- 152,158 ----
  static int 
  sheep_net_receiver( struct sk_buff *skb, struct net_device *dev, struct packet_type *pt )
  {
! 	int multicast = (skb->mac.ethernet->h_dest[0] & ETH_ADDR_MULTICAST);
  	const char *laddr = dev->dev_addr;
  	struct sk_buff *skb2;
  	struct SheepVars *v = (struct SheepVars*)pt;
***************
*** 166,172 ****
  
  		if( !multicast ) {
  			// Drop, unless this is a localhost -> MOL transmission */
! 			if( addrcmp((char*)&((struct ethhdr *)(skb->mac.raw))->h_dest, v->fake_addr) )
  				goto drop;
  
  			/* XXX: If it were possible, we would prevent the packet from beeing sent out
--- 166,172 ----
  
  		if( !multicast ) {
  			// Drop, unless this is a localhost -> MOL transmission */
! 			if( addrcmp((char*)&skb->mac.ethernet->h_dest, v->fake_addr) )
  				goto drop;
  
  			/* XXX: If it were possible, we would prevent the packet from beeing sent out
***************
*** 177,192 ****
  			 * the controller. This way, the packet ought to be discarded by
  			 * switches.
  			 */
! 			cpyaddr( &((struct ethhdr *)(skb->mac.raw))->h_dest[0], laddr );
  		}
  	} else {
  		// is this a packet to the local host from MOL?
! 		if( !addrcmp((char*)&((struct ethhdr *)(skb->mac.raw))->h_source, v->fake_addr) )
  			goto drop;
  		
  		if( !multicast ) {
  			// if the packet is not meant for this host, discard it
! 			if( addrcmp((char*)&((struct ethhdr *)(skb->mac.raw))->h_dest, laddr) )
  				goto drop;
  
  			// filter IP-traffic
--- 177,192 ----
  			 * the controller. This way, the packet ought to be discarded by
  			 * switches.
  			 */
! 			cpyaddr( &skb->mac.ethernet->h_dest[0], laddr );
  		}
  	} else {
  		// is this a packet to the local host from MOL?
! 		if( !addrcmp((char*)&skb->mac.ethernet->h_source, v->fake_addr) )
  			goto drop;
  		
  		if( !multicast ) {
  			// if the packet is not meant for this host, discard it
! 			if( addrcmp((char*)&skb->mac.ethernet->h_dest, laddr) )
  				goto drop;
  
  			// filter IP-traffic
***************
*** 214,220 ****
  	skb = skb2;
  
  	if( !multicast )
! 		cpyaddr( &((struct ethhdr *)(skb->mac.raw))->h_dest[0], v->fake_addr );
  
  	// We also want the Ethernet header
  	skb_push( skb, skb->data - skb->mac.raw );
--- 214,220 ----
  	skb = skb2;
  
  	if( !multicast )
! 		cpyaddr( &skb->mac.ethernet->h_dest[0], v->fake_addr );
  
  	// We also want the Ethernet header
  	skb_push( skb, skb->data - skb->mac.raw );
***************
*** 396,402 ****
  	skb->mac.raw = skb->data;
  
  	// Base the IP-filter on the IP address of outgoing ARPs
! 	if( ((struct ethhdr *)(skb->mac.raw))->h_proto == htons(ETH_P_ARP) ) {
  		char *s = &skb->data[14+14];	/* source IP-address */
  		int n[4];
  		if( *(long*)s != v->ipfilter ) {
--- 396,402 ----
  	skb->mac.raw = skb->data;
  
  	// Base the IP-filter on the IP address of outgoing ARPs
! 	if( skb->mac.ethernet->h_proto == htons(ETH_P_ARP) ) {
  		char *s = &skb->data[14+14];	/* source IP-address */
  		int n[4];
  		if( *(long*)s != v->ipfilter ) {
_______________________________________________
yellowdog-general mailing list
[email protected]
http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general
HINT: to Google archives, try  '<keywords> site:terrasoftsolutions.com'

Reply via email to