diff --git a/scapy/arch/linux.py b/scapy/arch/linux.py
index db8b5c72743024402552972cd8f9cb973d3dab5d..504ad693b0fdc4cad9ab8d3508d4988f2d989a56 100644
--- a/scapy/arch/linux.py
+++ b/scapy/arch/linux.py
@@ -13,6 +13,7 @@ from select import select
 from fcntl import ioctl
 import scapy.utils
 import scapy.utils6
+from scapy.packet import Packet, Padding
 from scapy.config import conf
 from scapy.data import *
 from scapy.supersocket import SuperSocket
@@ -398,14 +399,15 @@ class L3PacketSocket(SuperSocket):
             sx = str(ll(x))
             x.sent_time = time.time()
             self.outs.sendto(sx, sdto)
-        except socket.error,msg:
+        except socket.error, msg:
             x.sent_time = time.time()  # bad approximation
-            if conf.auto_fragment and msg[0] == 90:
+            if msg[0] == 22 and len(sx) < conf.min_pkt_size:
+                self.outs.send(sx + "\x00" * (conf.min_pkt_size - len(sx)))
+            elif conf.auto_fragment and msg[0] == 90:
                 for p in x.fragment():
                     self.outs.sendto(str(ll(p)), sdto)
             else:
                 raise
-                    
 
 
 
@@ -460,6 +462,17 @@ class L2Socket(SuperSocket):
             q = conf.raw_layer(pkt)
         q.time = get_last_packet_timestamp(self.ins)
         return q
+    def send(self, x):
+        try:
+            return SuperSocket.send(self, x)
+        except socket.error, msg:
+            if msg[0] == 22 and len(x) < conf.min_pkt_size:
+                padding = "\x00" * (conf.min_pkt_size - len(x))
+                if isinstance(x, Packet):
+                    return SuperSocket.send(self, x / Padding(load=padding))
+                else:
+                    return SuperSocket.send(self, str(x) + padding)
+            raise
 
 
 class L2ListenSocket(SuperSocket):
diff --git a/scapy/config.py b/scapy/config.py
index 91da07f73421f0455bc9690636232fa92adc0db6..19c74b3d00cbfa305f2dff16e6160eaa811a3f2d 100755
--- a/scapy/config.py
+++ b/scapy/config.py
@@ -345,6 +345,7 @@ extensions_paths: path or list of paths where extensions are to be looked for
     L3socket = None
     L2socket = None
     L2listen = None
+    min_pkt_size = 60
     histfile = os.path.join(os.path.expanduser("~"), ".scapy_history")
     padding = 1
     except_filter = ""