Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


fix a minor bug when converting MAC string to hexs
[palacios.git] / palacios / include / palacios / vmm_ethernet.h
index c4725a9..b141a59 100644 (file)
@@ -102,9 +102,10 @@ static inline int compare_ether_hdr(const uint8_t * hdr1, const uint8_t * hdr2)
 
 /* AA:BB:CC:DD:EE:FF */
 static inline int str2mac(char * macstr, uint8_t * mac){
-    char hex[2], *s = macstr;
+    char hex[3], *s = macstr;
     int i = 0;
 
+    hex[2] = 0;
     while(s){
        memcpy(hex, s, 2);
        mac[i++] = (char)atox(hex);